Gravity and rotation

ForcingForcing Member Posts: 93
edited November -1 in Working with GS (Mac)
Hello Community,

Can someone help me please, my problem is i use gravity on my game, i made actors, who aren´t moveable, because, when it isnt moveable, it´s don´t using physics!

But i want to make my actor rotating, when i click to it, but the actor isn´t moveable, so i can´t use rotation!

And when i click to moveable, so its using physics, but i don´t want it on this actor, how can i solve it??

(I´am complicated, i know ^^)

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you should be able to use interpolate to make it rotate while not moveable

    create a self bolean attribute called rotate

    Then create rule
    When touch is Pressed
    Change attribiute self.rotate to true
    Otherwise
    Change attribute self.rotate to fales

    Then a second rule when self.rotate is true
    interpolate self.rotation to self.rotation+10 for a duration of 0.1

    This should give you a small change in rotation each time you touch

    If you wanted to do a constant rotation once touch instead of interpolate you should be able to do
    constrain self.rotation to self.rotation+1
    but be sure to take the otherwise out of the first rule or it will stop when you lift up .

    Good Luck
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Darn TSB had something already to go while I was still typing. :)
  • ForcingForcing Member Posts: 93
    WOOW Thank you VERY MUCH @tenrdrmer, @tshirtbooth :D It works with both!

    You two saved my day ^^
Sign In or Register to comment.