collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
895 stars 101 forks source link

Smooth consistency of COF direction changes #66

Open collinsmith opened 4 years ago

collinsmith commented 4 years ago

Moving towards a target at an angle close to two directions causes character COFs to flicker between both directions (this is a unique case for player-controlled entities only because of input devices). There needs to be some stickiness to the player's direction in this case so that their direction is more consistent. I think this can be accomplished by adding some padding to ignore direction changes unless the angle has changed more than Φ within t.