Advertisement

AI character movement control

Started by August 30, 2007 07:55 AM
1 comment, last by Timkin 17 years, 2 months ago
I am trying to implement movement control for my animated characters. Given that we already have a given path (angular not a spline) to a goal (that was generated to avoid static obstacles) we want to approximately follow, I need to calculate the position and orientation of my character (which has a limited movement speed) at any given time (without ever instantaneously changing orientation). From what i have been reading there seems to be 4 common approaches to this problem: -Stop and turn: when you reach a path corner you stop moving linearly for a moment (time proportional to the amount of turning you need to do) and turn, then move linearly on to the next corner -Turn while moving: when you are nearing a corner begin reorienting while still translating along the exact path (end up strafing near corners). -Path smoothing: where you smooth out the corners of your angular path, replacing the discontinuous corner section with a circle arc e.g. http://www.gamasutra.com/features/20010314/pinter_01.htm -Velocity Steering: where you only have control of the velocity vector of your characters and essentially steer him along the path or to destinations e.g. http://opensteer.sourceforge.net/ -Acceleration Steering: where you control angular and linear acceleration that in turn controls the velocity vector Does anyone have suggestions? What is most commonly used in games like WOW, or BioShock (I know those 2 are very different)
Bioshock has the absolute worst AI/Pathfinding I've seen in a while so please don't use that as your model =)

Path smoothing is harder but IMHO a better result because since it's done in the pathfinder, all points are guaranteed to be valid.

We're currently using over-steering in my current project which is easy to implement, but has edge cases that are hard to fix. Basically you go to the waypoint and upon hitting it begin turning nicely towards the next goal. This results with a smooth path with no math other than capping the rotation rate being required. The downside, obviously, is that by oversteering you can veer off the A* mesh. To fix this we've implemented a bone-headed bumb & steer to avoid inter-penetrating with world geometry and require that the artists try to stick to convex meshes. (our solution is still a work in progress and we may end up just re-factoring it into a path-smoothing solution)

-me
Advertisement
Palidine, is there a particular reason you want your agents to pass through the path waypoint?

This topic is closed to new replies.

Advertisement