GDevelop-extensions
GDevelop-extensions copied to clipboard
[Curved movement] Certain easing functions cause TweenPathMovement to never finish
Is there an existing issue for this?
- [X] I have searched the existing issues
Enter the name of the extension
Curved movement
Describe the bug of the extension
The easing functions "easeInBack"
and "swingFrom"
cause TweenPathMovement
to never finish its movement. This means the Finished to move
and Reached an end
conditions never return true. The output of behavior.Progress()
stops at 0.9999999999999998
.
Steps to reproduce
- Clone MRP from https://github.com/Granshmeyr/GDevelop-CurvedMovement-MRP
- Run game
- Read the screen and scroll to
"easeInBack"
&"swingFrom"
- Notice how the square never turns green for these easing functions
GDevelop platform
Desktop
GDevelop version
5.4.203
Platform info
Windows
Windows 11 Home
Desktop
Additional context
Temporary solution is to evaluate the expression Math.abs(pathBehavior.Progress() - 1) <= Number.EPSILON
or something similar to eliminate the obvious floating point error.