When Player rotates movement seems reversed.


the code below shows how i get my character to move based on the joystick input. problem is that when the character rotates 360, the player seems to be moving in reverse. can someone help me out?

void Update()
        //get movement from 
		 velocity1 = new Vector3(joystick.Horizontal * 10f, rigidbody.velocity.y, joystick.Vertical * 10f);
		rigidbody.velocity = velocity1;


Try velocity = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical")); or Go in Edit >> Project Settings >> Input, then select invert for Horizontal and Vertical. Hope this helps!