Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

move in the direction that player is facing unity

float movementSpeed = 100f;

void Update()
{
	rb.GetComponent<Rigidbody>().velocity = transform.forward * Time.deltaTime * movementSpeed;
}
 
PREVIOUS NEXT
Tagged: #move #direction #player #facing #unity
ADD COMMENT
Topic
Name
2+8 =