Rotate on bounce
Hi Guys,
I'm developing a simple little game where you draw a line and your character bounces off it - simple stuff really.
However, I'm stuck on something and I'm wondering if anyone can help me out.
Basically, the character bounces off the line with no problem, however, when he bounces I would like it if the character spins, currently he just bounces off and it looks a little static.
I've tried a couple of things but none of them work, and its kinda annoying as what I'm trying to do seems very easy.
Thanks again to you all and for any advise you may give.
Cheers and have a great day,
Chris
I'm developing a simple little game where you draw a line and your character bounces off it - simple stuff really.
However, I'm stuck on something and I'm wondering if anyone can help me out.
Basically, the character bounces off the line with no problem, however, when he bounces I would like it if the character spins, currently he just bounces off and it looks a little static.
I've tried a couple of things but none of them work, and its kinda annoying as what I'm trying to do seems very easy.
Thanks again to you all and for any advise you may give.
Cheers and have a great day,
Chris
Best Answer
-
JohnPapiomitis Posts: 6,256
So you want him to rotate the whole time hes in the air?
You can make a rule when actor collides with ground actor
Now dont put anything in the main part of the rule and open up the otherwise section
And put a rotate behavior in there.
Since its in the otherwise section he will continue to rotate when hes not touching the actor.
Now if you want him to say just do a flip and do one full rotation only you can interpolate its rotation to 360 or -360 depending on what direction you want him to spin.
Answers
Crikey, that was a quick reply.
Thank you so much for this - I don't know why I found this tricky as its easy, I think I was trying to over complicate things.
Thank you very much, you've saved me quite a bit of time my friend.
Have a great day,
Cheers,
Chris