I am using this code to move my player:
var x = Input.GetAxisRaw("Horizontal");
var z = Input.GetAxisRaw("Vertical");
Vector3 movement = new Vector3(x, 0, z);
rb.AddForce(movement * speed);
But with this, the player is moving very heavy and is sliding through the map even if don’t move the player anymore. And if I move the player, he is accelerating, but I want a static speed. Do you know what I have to change?
The x and z value are also changing when the player rotates. So if the player turns left I have to press forward (w) to go right (d)
The movement is totally weird. The directions are always changing when the player rotates.