Why is my player still moving forward(north) in world coordinates? I want the player to face and move in a new direction. Please explain in simple terms.
void PlayerMover()
{
_step = _speed * _speedMultiplier * Time.deltaTime;
PlayerBoost();
float vertical = Input.GetAxis("Vertical");
PlayerRotation();
Vector3 direction = new Vector3(-vertical, 0, 0);
transform.TransformDirection(Vector3.forward);
transform.position += direction * _step;
}
I am using C#/UNITY
extra characters to satisfy minimum 220 character limit
New contributor
eyetengu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.