Skip to content
Sign upLog in
← Back to Community

[KABOOM] How do you modify a sprite's rotation?

Profile icon
MrVoo

I'm trying to get a sprite named person, and I'm trying to change its rotation. Using person.pos.x to change position worked, why doesn't person.rotate work?

Answered by SixBeeps [earned 5 cycles]
View Answer
Voters
Profile icon
MisterToenails
Profile icon
MrVoo
Comments
hotnewtop
Profile icon
SixBeeps

Maybe it's rot.

Either way, take a look at rotate(). That's a good place to start.

Profile icon
MrVoo

@SixBeeps
I used rotate() as you said to start it at 0 degrees, and I can change that with no problem, but I want to rotate it after that. These are the things I've tried:

person.rotate = number; person.rot = number; person.rotate(number); person.rot(number);
Profile icon
SixBeeps

@MrVoo
Just peeked at the source code. Try person.angle = number.

Profile icon
MrVoo

@SixBeeps
Yay it worked, thanks