Check where mouse is clicked
Hello! When you use Input.GetMouseButtonDown(0), what's a way where you could tell where it is pressed? Pretty much I want it to be like where if you click the left of the screen, it does a function,...
View ArticleUnity 4 C-Sharp Do Something when I hold left click on a specific object?
Hi, I'm relatively new to Unity as well as C-Sharp, and im trying to make a game for mobile in which there are 3 controls on screen. An arrow facing right, one facing left, and one facing up. What I...
View Articleandroid accelerometer left right
I'm trying to create android app that makes use of the accelerometer, to do so I'm using this script: #pragma strict function Update () { transform.Translate(Input.acceleration.x, 0,...
View ArticleWhy is left going right, and rights going left
I have used the same model as they said in the Tutorial but when I got left he goes right and when I go right he goes left. Anyone know the solution? #pragma strict public var turnSmoothing : float =...
View ArticleUnity webplayer left click problem
I've seen the right click problem with the context menu thing, and this is a little different. Basically I have a "PLAY" button but it simply doesn't work. It works in the editor, and if I build it, it...
View ArticleUnity Support of Right to Left Languages, especially Syriac (Assyrian)
I would like to know how can the Unity IDE and Engine support the Right-to-Left languages, especially Syriac (Assyrian/Neo-Aramaic). It does somewhat support Arabic Alphabet, but doesn't even connect...
View ArticleHow do I script movement for my player?
Hi I am trying to make a simple 2D platformer and I am having the hardest time trying to figure out how to get my block to move and when I think that I fixed it Unity says "An instance of type...
View Articlehi, am getting these two errors
UnityException: Tag: Moveable is not defined! MoveRight.Start () (at Assets/MoveRight.cs:19) NullReferenceException MoveRight.Update () (at Assets/MoveRight.cs:67) with the following code using...
View ArticleMake a cube rotate in right or left direction randomly
i have a cube which i want to rote right or left on the x axis as shown in the diagram randomly.i have seen the euler angles and the rotation concept and some questions about them but have not found...
View ArticleFace player right/left
I have a player that runs right and left. His body is always faced to the right. I want my player to face right when i make him run right and face left when i make him face left. I have a code that...
View ArticleWhen I start to try the game, My car/character go to the left automatically
Hello, I'm beginning with unity and I tried the Example Project (of Unity 5 & 4) my character/Car go to the left automatically (I'm doing nothing, but my car go to the left). I don't know why :(....
View ArticleHow can I get the x position for the left(and right) of the screen?
In Unity, I am making a game where spheres spawn at a random position. I want the spheres can spawn a little outside the screen. This is the code where the spheres spawn: `Instantiate (sphere_prefab,...
View ArticleHow can I set a GUI.box` align point?
I know there is a function to set the text-alignment but I can`t figure out how to set the box` align-point. It is aligning at the upper-left corner, but I want to align it in the center screen.
View ArticleHow to make the front, left, right, or the back of a gameobject look at a...
I have a gameobject that i have rotating around a target and i would like for the gameobject to face the direction of movement by making the left or right of the gameobject face the target when moving....
View Articleleft force right force
![alt text][1] I want to apply force as the picture probably I use AddForceAtPosition but I dont use help me ? [1]: /storage/temp/60897-gorsel.png
View ArticleC# Xbox One Controller Left Stick Rotation Issues
I've been working on a script for rotating a gameobject with the left stick of an Xbox One controller. It will rotate if I move the left stick along one of the x or y axis. But if I rotate the left...
View ArticleRigidbody2d Moving up and Down but not left and right
Hello guys, Fresh unity user here, My RigidBody2D (pong game) is correctly moving up and down, but not left and right. The code seems simple, but i can't understand why it's not moving. I have set the...
View ArticleUI - How to align all texts to the left
Hello I am currently trying to make a menu, containing 5 buttons. When a button is hovered over, it changes colour. The text however, shall be changed by script later, so I had to find a method to...
View Articlehow to control player movement with ui buttons?
kinda explained it in the question, ive looked everywhere and found plenty of examples so i kinda know what im doing but not how to do it, my script right now manages keyboard keys for left right and...
View ArticleSwipe Control for Android , Move left and Right ( vertical )
hello world i've a problem with my game ( Ping Pong ) for Android ; the paddle of player can't Move on my smartphone , so pliiz give me the script of swipe control and thanks in advance .
View Article