Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity c# get direction of object

 // Get direction from A to B
 Vector3 posA = ObjectA.position;
 Vector3 posB = ObjectB.position;
 //Destination - Origin
 Vector3 dir = (posB - posA).normalized;
 
PREVIOUS NEXT
Tagged: #unity #direction #object
ADD COMMENT
Topic
Name
3+7 =