Saving people from seizures

It’s a shame that I can’t upload video of this, since a video explains this so much better, but the logic I’m using for moving players involves momentum (I don’t use mass yet, but players do have velocities). The problem with that is that sometimes players move a little bit past where there destination is. Next frame they accelerate the other direction. Eventually they move past their spot, just in a different direction. This leads to a quick “shaking” of players over their goal, since if they got to their goal they must have some velocity that will carry them over it.
The solution I think is to just cut out their velocity to zero if they are within a small radius of their goal, maybe 0.25 yards?
This should be avoided for defenders who are covering recievers, since they don’t have that problem, and it should be avoided for all offensive players, since their pathfinding system avoids it for them. It’s really only useful for zone defenders, and only when they move back to the center of their zone.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s