Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make something addforce in the direction of something in untiy

dir = target.transform.position - transform.position;
dir = dir.normalized;
rigidbody.AddForce(dir * force);
 
PREVIOUS NEXT
Tagged: #addforce #direction #untiy
ADD COMMENT
Topic
Name
9+5 =