Open mgerhardy opened 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)
http://www.red3d.com/cwr/papers/1999/gdc99steer.html
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)