-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Milestone
Description
After updating HaxeFlixel and all of it's backend libraries to their latest versions, I've noticed sprites specifically won't render rotated frames. This issue only seems prevalent when targeting Hashlink and it does not seem to affect the C++ target on my end.
Using the debugger console and setting the frame's angle
parameter to 0 made the affected frames render once again (minus the rotation).
Sample code:
class PlayState extends FlxState
{
override public function create()
{
super.create();
var sprite:FlxSprite = new FlxSprite();
sprite.frames = FlxAtlasFrames.fromSparrow("assets/images/TestImage.png", "assets/images/TestImage.xml");
sprite.animation.addByPrefix("static", "TestAnimation");
sprite.animation.play("static");
add(sprite);
}
}
Sample sparrow atlas with rotated frame:
<?xml version="1.0" encoding="UTF-8"?>
<TextureAtlas imagePath="TestImage.png">
<SubTexture name="TestAnimation0001" x="0" y="0" width="150" height="150" rotated="true"/>
</TextureAtlas>