Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

movetowards unity

//put this in update method and disable rigidbody2d (gravity)
void Update()
{
transform.position += (target - transform.position).normalized * movementSpeed * Time.deltaTime;
}
 
PREVIOUS NEXT
Tagged: #movetowards #unity
ADD COMMENT
Topic
Name
2+4 =