Theoretical maths fix for Move state ease out velocity

This commit is contained in:
2023-01-29 12:02:13 -06:00
parent 6d64acd318
commit 2bda351949

View File

@@ -79,7 +79,7 @@ public class Move extends CyberarmState {
if (Math.abs(travelledDistance) < easeInDistance) {
ratio = travelledDistance / easeInDistance;
} else if (Math.abs(travelledDistance) > targetDistance - easeOutDistance) {
ratio = 1.0 - ((targetDistance - Math.abs(travelledDistance)) / easeOutDistance);
ratio = (targetDistance - Math.abs(travelledDistance)) / easeOutDistance;
}
easeVelocity = targetVelocity * ratio;