Hello guys, i want to recognize the mouse movement (if it went left, or right, or back etc). How can i do that?
1 Answer
1Input.GetAxis(“Mouse Y”) //returns the Y-Axis and
Input.GetAxis(“Mouse X”) //return the X-Axis value the mouse is currently at
Also this links may help you: How to rotate an object's X, Y, Z based on mouse movement - Questions & Answers - Unity Discussions
Hello, thank youm i just want to ask what about back-forth and how can i detect if the mouse has moved more than a specific number of cm :D
– AzarothThe moving more than a specific amount can be solved with this code: http://answers.unity3d.com/questions/28089/mouse-movement-.html what do you mean by back-forth?
– ExTheSeaIn that code mouseThreshold is 0.2 cm? I mean backward and forward :D
– AzarothI will test and tell you thanx!
– AzarothYes it worked! One last question, what happens if i want to detect a curve? When the mouse does a circle for example.
– Azaroth