for learning purpuse, I set myselfa target to make a little Star Shooter.
Right now you can move the ship, asteroids are spawning and enemys are moving down to your space ship, shooting, in a sine wave (math calculated no matinee).
What I try to do is, that the enemy space ships avoid the astroids while flying down. It would be easy to make wave after wave or let them crush into the astroids but I want them to behave a little smarter.
Does anybody have an idee how to do this?
My First thought was a navmesh (never used it) but all I read about it, its not very good to use it if you need a frame by frame update.
Can I get the angle of between two moving objects to adjust the math path the enemy is moving (to avoid collision with the astroids)? Both have a speed (the ship(s) and the astroid(s)) if the ship can’t avoid collision, a collision is ok. I just want to make them a little smater then just following a math sinus path.
Any Ideas how to do that?
Meshes are Spaceholders right now: Astroid from S2 from Blendswap and the Main Ship from Herminio Nieves