Quantcast
Channel: Latest Questions by Tyler 2
Browsing index pages (60 articles)

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 Article


Transform.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 Article


Destroying 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 Article

Material 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 Article

Playing 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 Article


Moving 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 Article

Looking 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 Article

Accessing 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 Article


Instantiate 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 Article


Instantiate 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 Article

Instantiate 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 Article

Instantiate 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 Article

Make 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 Article


Movement 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 Article

Look 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 Article


ScreenPointToRay 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 Article

Accessing public variables?

How do I access public variables that are in other scenes?

View Article


Rotation 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 Article

Restricting 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 Article

Accessing 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
Browsing index pages (60 articles)


Latest Images