StStep / tatzelwurm-client

Godot engine and wiki with some trig-examples of mass-battle movement, i.e., combining arcs and lines.
MIT License
4 stars 0 forks source link

Implement State Based Rotation #179

Closed StStep closed 4 years ago

StStep commented 4 years ago

I've started doing this. While it's technically done, I am fine-tuning the deceleration and lock-in of target rotation. It works at high accelerations, I just need to double check my math for smaller accelerations.

StStep commented 4 years ago

The final oscillations seem to have existed due to float rounding? It would reach with 0.0008 radians of the desired rotation and have zero rotational velocity, but would start up again. This offset is so small as to not be noticeable, so I made a "snap" distance from which it is considered having zero offset to goal if within 0.001 radians.