By Chris Caruthers
Our AI enemies were working pretty well to begin with, but their movement looked choppy and off, and didn’t fit what they were doing. I took the task to fix this and make them look more natural. Given that we had them baking out paths already, it made sense to have them move with steering behaviors to fit the path. At first I tried having the enemies always moving along their Z vector (always forward) and simply rotate them when the moved out of line with their path. This caused a lot of chaos and confusion for the AI. They rarely kept in their line and when they did they moved erratically. This was scrapped in favor of doing steering based only on velocity. The final steering behaviors for the enemies use just velocity for moving the enemies and they turn manually based on where they are moving to. This works pretty well but, as the velocity acts immediately and the turning takes time, the enemies will sometimes run backwards for a time before correcting themselves. A simple way to fix this would be to modulate movement speed by their alignment with their path
Comments
Post a Comment