Rotating when jumping or falling
LyboTech
Member Posts: 135
I have a character that moves horizontally, and can both jump and fall, I want him to rotate 90 degrees every time he jumps or falls. What's the best way to accomplish this ?.
Answers
Use the rotate behavior whenever the actor jumps.
Should've been more clear: I've already tried to "Rotate to angle" Self.rotation -> Self.rotation+90. But that doesn't work
You might want to provide a little more information about what you've done and what is not working.
That's not going to work as you are changing the real rotation against itself. You need to store the current rotation in a self variable.
So
Make a self variable self.rotateangle
Rule
Whatever condition you want to trigger the rotation
Change attribute self.rotateangle to self.rotation
Rotate to angle self.rotateangle+90
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I would do it with the Animate behavior.
BRUNKT.com
Follow me at: Twitter - Instagram
Games and Templates
Appstore
@Lost_Oasis_Games Thanks, I've tried that but it doesn't work.
@8bitninja It would work except I'm gonna have 20 different characters
I'll try to do a workaround I guess..