Rotation using both axis inputs?
Hello. I am trying to make an object's rotation around the y axis be controlled by the player's input on the horizontal and vertical axes (in my case WASD). So if the player is pressing W, the y...
View ArticleAutomatic GUI scaling?
Hello. When I was developing the GUI, I placed the elements using absolute pixel positions, so when the game is played at a different resolution, the placement of the buttons is off(ex: something I...
View ArticleGamecenter leaderboards?
Hello. I know that using GameCenter features in a unity project is a complex subject but I am wondering what do I do first if I want to integrate GameCenter leaderboards into my unity iOS game(does...
View ArticleSocial features for iOS?
Hello, What would I do first if I want to have email, facebook and twitter integration (having pre-set messages/posts that the player can send from within the game) in my unity iOS game(anyone know of...
View ArticleMuting audio sources for iOS?
Hey. When making an Unity iOS game, how can I detect if the player's music is playing when that app starts, and if it is, mute certain audio sources in my game? Also, how can I allow the player to...
View ArticleI need some help modifying a script
Hello. I got this timer script from someone, but I am wondering how would I make it (the countdown timer) stop for 10 seconds and then start up again? Thanksprivate var startTime; private var...
View ArticleText being part of a function?
I hope this makes sense. Is there a way to have a variable, which corresponds to a string of text, and the string of text is a piece of code? Something like this(its for a turn based RPG) var A = 0;...
View ArticleOpenFeint integration?
Hello. When using OpenFeint in a Unity iOS project, how can I have the leaderboards appear directly in the game (using GUI skins, etc.) without having to go into the OpenFeint dashboard?
View ArticleAccessing iOS mail?
Hello. From within my Unity made iOS game, how can I access the mail app and start a message that include pre written text and the ability to interact with my app though code (so I can have a challenge...
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?
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ArticleInspector 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