Inspector sub-menu?
In the Unity inspector, how can I make variables appear in a sub-menu(where there is a small arrow next to the category, and If it is clicked it displays the rest of the individual variables). Several...
View ArticleTransform.Rotation question...
Hello. How can I convert something that uses EularAngles for individual axes to something that uses Transform.rotation?// get the relative and world position of the mouse. var...
View ArticleDestroying objects based on the tag.
Hello. I am trying to destroy all of the objects in a scene with a certain tag, but I get this error using my code. What is wrong? ThanksNo appropriate version of 'M_1.Destroy' for the argument list...
View ArticleMaterial fading?
How can I make a mesh renderer slowly fade from one material to another (as opposed to having it instantly change) through scripting? Thanks
View ArticlePlaying iTween animations?
Hello. When using iTween(and the iTween event editor?), how do you start/stop/queue an animation from within a script(as if they were normal animations)? Thanks
View ArticleMoving and firing a projectile?
Hello. I got this script from someone on the forums (credit goes to BigMisterB, he was very helpful), its purpose is to allow the player to control a space ship just like in this game (the ship looks...
View ArticleLooking at the mouse cursor...
Hello. If I have an object, in the center of the screen (its not an FPS/TPS, the object does not move), how can I have that object look at the mouse cursor (as if the mouse cursor was an object)? Thanks
View ArticleAccessing variables inside functions?
Hello. If I am defining a variable during a function, how can I make it act like a public/static variable, so that it can be accessed by another script?Specifically I want to access the "totalBounds"...
View ArticleInstantiate position tracking?
Hello. Suppose I repeatedly invoke a function that instantiates a random object. How can I use this to move the object(the one that is spawning the others) to the x.max bounding point of the newest...
View ArticleInstantiate position...
Hello. I am working on a "runner" type game (like canabalt) and I am wondering how to spawn the level sections. I currently just spawn a bunch of sections, that are all the same size in a line. This...
View ArticleInstantiate in a line?
Hello. If I have one of the default size unity cubes, how can I spawn 64 copies of the cube in a row along the x axis?
View ArticleInstantiate distance?
Hello. Suppose I have three cubes, that are all different lengths(height/width values are all the same), that I want to spawn in a row along the z axis. How can I make instantiate them so that there is...
View ArticleMake one object look at another?
Hello. How can I make one object look at another, but only along one axis(for example, the object will only look at the other by rotating along the x axis and will not move at all along the y/z axes as...
View ArticleMovement with the cursor?
Hey. I want to make a game like this. How can I get the ships movement to work(where the ship rotates to look at the mouse cursor)? I have tried several things (using a look at function, trying to use...
View ArticleLook at the mouse?
Hello. In this game, the space ship rotates to look at the mouse cursor. How can I do this, but only along one axis? Thanks
View ArticleScreenPointToRay question...
When using screenPointToRay to get the position of the users mouse (like in the code below), how can you only get the position of only one of the cursor's axes(so I could only get the x position...
View ArticleRotation along two axes only?
Hello. I am developing a space shooter similar to this. In that game, the player's ship will follow the crosshairs, but will not rotate along the z axis (it will not "do a barrel roll"...couldn't...
View ArticleRestricting transform.LookAt?
Hello. When using transform.LookAt, is there a way to restrict the object's rotation so that no matter where the "target object" goes, the object that is doing the looking does not rotate at all around...
View ArticleAccessing components/variables?
Hello. I am trying to use GetComponent to access public variables that are in another script, but I keep getting errors(such as "An instance of type 'UnityEngine.Component' is required to access non...
View Article