Steering Behaviors written for Angelscript?

Started by
10 comments, last by DekuTree64 5 years, 2 months ago

It's probably working correctly. If max velocity is 1.5 pixels per frame, and the objects are several hundred pixels apart, then it will indeed take several hundred frames to get there. And since the target will have moved several hundred pixels during that time, you should aim several hundred pixels ahead of its current position.

Looking at that seek function in your original post, it should be fine if the target position passed to it is far away from the current position. And the line velocity.limit(maxspeed) in the update function should prevent velocity from ever going too high.

This topic is closed to new replies.

Advertisement