I'm trying to move a 3D plane with my mouse joysticks. At the moment my code, inside the Update method, is as follows:
xMin1 += Input.GetAxisRaw("LeftRight"); yMin1 += Input.GetAxisRaw("UpDown"); //_targetPlane is my public game object _targetPlane.transform.position = new Vector3(xMin1, yMin1, 2.5f);
However, when I run my game, the plane jumps to 300 units away, even though I've set it to be 0. This happens as soon as I run the game. I don't need to move my thumb stick.
Am I doing this wrong? What is the best way to move my gameobject with a joystick?