Quantcast
Channel: Answers by "IvovdMarel"
Viewing all articles
Browse latest Browse all 145

Answer by IvovdMarel

$
0
0
If you want to make it stop when it's close to the target, you can use Vector3.Distance (and check if it's smaller than a certain amount). If you call AddForce every frame, more and more force will be applied and the object will most likely accelerate really fast. Instead, directly set the velocity by using rigidbod2D.velocity.

Viewing all articles
Browse latest Browse all 145

Trending Articles