mgerhardy / simpleai

SimpleAI is a small C++ AI behaviour tree based library with a QT5 based remote debugger (and with optional LUA bindings) released under MIT.
http://www.caveproductions.org/
Other
177 stars 12 forks source link

Evasion and pursuit #8

Open mgerhardy opened 9 years ago

mgerhardy commented 9 years ago

Pursuit: distance = (target.getPosition() - chr.getPosition()).len() t = distance * c newPosition = chr.getPosition() + target->getVelocity() * t TargetSeek(newPosition)

Evasion: distance = (target.getPosition() - chr.getPosition()).len() t = distance * c newPosition = chr.getPosition() + target->getVelocity() * t TargetFlee(newPosition)

mgerhardy commented 9 years ago

http://www.red3d.com/cwr/papers/1999/gdc99steer.html