Skip to content

Rotated frames not rendering on Hashlink #3433

@rifxii

Description

@rifxii

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).

Image

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions