Hi everybody,
I have another question for the brain trust. I am working on a plane game. I am able to control my plane perfectly fine and I have replicated the plane class to create enemy planes. The question I have is what is the best way to efficiently create a simple AI system for the enemy planes?
Here is what I was thinking:
I attached a screen shot of a plane with some lines to demonstrate what I was thinking. There would actually be 9 lines total but I am showing on 3 lines. If I detect an "obstacle" mesh via the right rays, then I would have the plane move left and conversely for the opposite. If I detect an "player" mesh on any of the rays, then I would rotate and fly towards the plane.
I have played with simple line meshes to do the same thing but I was worried it could be less efficient if I had a large collection of obstacles and players objects to loop through to detect a collision.
Any thoughts would be greatly appreciated!