Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - argon_vile

Pages: [1]
1
help / Bug: FlxU.rotatePoint() does not work?
« on: Fri, May 23, 2014 »
FlxU.rotatePoint does not work. The parameters are (X, Y, PivotX, PivotY, Angle), and it is supposed to rotate a point in 2D space around the pivot.

  • FlxU.rotatePoint(10, 10, 20, 10, 0) returns [10, -10]. Since we are rotating by 0 degrees, it should just return the original point, [10, 10]
  • FlxU.rotatePoint(10, 10, 20, 10, 90) returns [40, 1]. It should return [20, 0] -- the original point was left of the pivot, so by rotating 90 degrees, we should now be directly above the pivot.

It looks like line 568, "PivotY+Y", is supposed to be "PivotY-Y"? I see no reason why someone would want to add two points in space to eachother to determine a vector of rotation. After making this change, the code works OK.

Pages: [1]