HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.93k stars 427 forks source link

FlxBitmapText does not respect the "origin" value when rotating #3144

Open EliteMasterEric opened 1 month ago

EliteMasterEric commented 1 month ago

Reproduction steps:

  1. Use flixel create to build a project from the FlxBitmapText template.
  2. Set the tf2.angle value and see that the sprite rotates around its center by default (as expected).
  3. Call tf2.origin.set(0, 0) to place the rotation origin at the top left of the sprite.
  4. Set the tf2.angle value.

Observed behavior: The sprite rotates around its center regardless of the origin value.

Expected behavior: The sprite should rotate around the defined origin. For example, placing the rotation origin at the top left of the sprite should pivot around that corner.