Answer the question
In order to leave comments, you need to log in
How to reset the speed in the direction of another object?
There are objects 1 and 2. 1-moves with some speed in the direction of its velocity vector. As you know, a vector can be decomposed into components. It is necessary to make sure that object 1 does not approach object 2, that is, zero the vector component that is directed towards object 2 (if it is not directed in the opposite direction). Question-How?
I only know a method with a bunch of sines, cosines, but there are a lot of such calculations to be done, so speed is important, can Unity (built-in functions) be able to solve it somehow?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question