How to code spaceship evasive maneuvers?
Hello all!
I'm designing a small real-time tactical space combat game for an university project, but there's a problem that I didn't get to the bottom of: the evasive maneuvers. When my spaceship A attacks an enemy one, I would like it to "flying around" to avoid enemy torpedos.
An extension of this problem is: If A and B are fighting, how do avoid them to collide with other spaceships?
My demo probject will allow to control only one spaceship and you'll be against another spaceship, so the second problem is more importantly a curiosity.
I know that this is not an easy one, but how would you solve ( or simplify ) the problem?
Note: I'm sorry if my English isn't perfect. Moreover, I'm new to Unity, but I did study C++, Java and Processing, so I can feel the potential!
Unity Answers is here to solve Unity problems, not algorithmics one.
$$anonymous$$ake research on the topic please
Your answer

Follow this Question
Related Questions
Player keeps spinning after collision 0 Answers
Please help to smooth player movement. 0 Answers
How do I check if inspector variable has a value? 1 Answer
Compiling Scipts shows and then Unity crashes. 0 Answers
Windows project not opening on Mac correctly - prefab errors with drag-and-drop, others 0 Answers