Waypoints?
Guys,
Ok I know this isn''t an AI question but this looked the most appropriate place to put this question:
How do I get an object to navigate from one waypoint to another whilst maintaining some semblance of correct orientation?
Specifically I''m working on a space based combat game where the enemy fighters are to be scripted to follow a waypointed path, however they need to be able to change orientation somewhere before the waypoint so as not to simply ''flick'' into the correct orientation.
Is this something anyone here could help with?
On another note, I hope to eventually allow the fighters to dynamically change their destination waypoint if they get fired at such that a shot that missed them because it was too low will force them to create a new waypoint in an upward direction (simulated AI if you will).
Any suggestions/comments appreciated.
MrChris
The best way I know, is to ''control'' the AI plane that same as you control yours. With continual feedback. It looks for it''s current orientation relating to it''s waypoint, and then turns the stick... Ie: too low, then pull up. Next frame, it checks again, and when he shot over it''s goal (ie: too high), he''ll turn down.
By giving them the same turn radius as you would get, you get (somewhat) smooth turning. Though they tend to wobble on straight paths
By giving them the same turn radius as you would get, you get (somewhat) smooth turning. Though they tend to wobble on straight paths
I think that in gamasutra there is an article about this ("realistic pathfinding" or something). Check it out.
RPG game programming and tutorials - Playable demo in Progress!
http://www.rrc2soft.com
http://www.rrc2soft.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement