Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

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

MrVoo
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?

1 year ago

Voters

Comments

TopNew
1
SixBeeps
SixBeeps

Maybe it's rot.

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

1 year ago
1
MrVoo
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);
1 year ago
1
SixBeeps
SixBeeps

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

1 year ago
1
MrVoo
MrVoo

@SixBeeps
Yay it worked, thanks

1 year ago