djcmm476
djcmm476

Reputation: 1813

Rotating a sprite in HaxeFlixel

I'm having trouble with something very simple in HaxeFlixel, but I can't find one reference to it anywhere online.

All I need to do is rotate a FlxSprite. There are multiple references online to a .rotation value that can be set, but my sprite does not have access to this for some reason.

Can anyone help out here, I have no idea where to go from here.

The graphics I'm creating is of type Player, which extends FlxSprite and is created with loadGraphic().

Upvotes: 2

Views: 3682

Answers (1)

user3928139
user3928139

Reputation: 171

FlxObject (which FlxSprite extends) has an angle property. Use it to rotate your sprites.

Upvotes: 12

Related Questions