MobileJoystick Crossplatform Input won't work.
I am using the mobile joystick that comes with Unity CrossPlatformInput. I am trying to make my player move with these controls with a 2D game (move the joystick up, the player moves up, down moves down etc.).
The player is locked on the x axis and won't move vertically with no errors coming up in the error log. These are the lines I have used:
void Update () {
//Mobile Controls
this.transform.Translate(CrossPlatformInputManager.GetAxis("Horizontal1") * speed * Time.deltaTime, 0, 0);
this.transform.Translate(CrossPlatformInputManager.GetAxis("Vertical1") * speed * Time.deltaTime, 0, 0);
}
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
Movement speed and animation based on mobile joystick position (Forward, Left/Right, Back) 1 Answer
Twin stick control 2D 1 Answer