Answers for "how to make something addforce in the direction of something in untiy"

C#
2

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);
Posted by: Guest on September-27-2020

Code answers related to "how to make something addforce in the direction of something in untiy"

C# Answers by Framework

Browse Popular Code Answers by Language