Answers for "move in the direction that player is facing unity"

C#
2

move in the direction that player is facing unity

float movementSpeed = 100f;

void Update()
{
	rb.GetComponent<Rigidbody>().velocity = transform.forward * Time.deltaTime * movementSpeed;
}
Posted by: Guest on August-10-2020

Code answers related to "move in the direction that player is facing unity"

C# Answers by Framework

Browse Popular Code Answers by Language