You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlxPoint.pivotRadians (and pivotDegrees) is not "rotating a point around a pivot by x amount clockwise", it is SETTING the point's position to x degrees/radians around the pivot.
For example:
If you have a point at (0, 50) and want to rotate it 90 degrees clockwise around a pivot (50, 50) it should end up at (50, 0): at -90 degrees
Instead, pivotDegrees is recalibrating the point to be at (100, 50) before setting it's angle and it ends up at (50, 100): 90 degrees.
Expected behavior: pivotRadians should not be "resetting" the point to angle = 0 from pivot before applying the new rotation.
The text was updated successfully, but these errors were encountered:
Code snippet reproducing the issue:
Observed behavior:
FlxPoint.pivotRadians
(andpivotDegrees
) is not "rotating a point around a pivot by x amount clockwise", it is SETTING the point's position to x degrees/radians around the pivot.For example:
If you have a point at (0, 50) and want to rotate it 90 degrees clockwise around a pivot (50, 50) it should end up at (50, 0): at -90 degrees
Instead,
pivotDegrees
is recalibrating the point to be at (100, 50) before setting it's angle and it ends up at (50, 100): 90 degrees.Expected behavior:
pivotRadians
should not be "resetting" the point to angle = 0 from pivot before applying the new rotation.The text was updated successfully, but these errors were encountered: