Movement speed and animation based on mobile joystick position (Forward, Left/Right, Back)
Hello, I am struggling to divide my mobile joystick to 4 areas (Up, Left, Right, Down). So basically the idea is to set player's movement speed and animation based on position of the joystick. Received input is Forward (from -1 to 1) and Side (from -1 to 1) (number 1).
In example number 2, player should move at forward speed and play forward animation (blue dot represents the joystick's position). In example number 3, player should move at backwards speed and play backwards animation. In example number 4, player should still move at backwards speed and play backwards animation and so on. I hope you got the point. Thank you for help :)
Answer by dragonly · Dec 28, 2015 at 11:34 PM
I solved my problem and this helped a lot -> http://answers.unity3d.com/questions/728680/how-to-get-the-angle-between-two-objects-with-ontr.html
Your answer
Follow this Question
Related Questions
c# Mobile Joystick issues - implementing joystick controls into movement and camera script 0 Answers
Trouble with cross platform input in mobile multiplayer 1 Answer
My character carries on the run animation for a few seconds even after standing still 0 Answers
MobileJoystick Crossplatform Input won't work. 0 Answers
Player i spining when moving 0 Answers