Spinning and spinning

RumiRumi Member, PRO Posts: 343
edited November -1 in Working with GS (Mac)
i need some help with my game. Your goal is to drag the character places and when he hits a wall he starts spinning. But he never stops! I have tried putting angular drag on but it doesn't work. I need help! I like the spinning but I want it to slow down and stop!

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Hmm, maybe you could have the character continue to spin until the player "drags" him.

    In your rule that you use to "touch and drag" add a Change Attribute self.rotation to 0

    That will make the player stop rotating when he's "dragged."

    Does this mess up your gameplay too much? or do you want to take it another direction? I can probably think of a few other things I would do here...
  • RumiRumi Member, PRO Posts: 343
    DrGlickert said:
    Hmm, maybe you could have the character continue to spin until the player "drags" him.

    In your rule that you use to "touch and drag" add a Change Attribute self.rotation to 0

    That will make the player stop rotating when he's "dragged."

    Does this mess up your gameplay too much? or do you want to take it another direction? I can probably think of a few other things I would do here...

    Thank you for the quick response but when the character bounces of walls and then dragged, He kinda of vibrates really fast and it just looks really weird. Is there a way of interpolating the rotation or something?
  • DrGlickertDrGlickert Member Posts: 1,135
    Sounds like your physics settings are causing the problems. You could try turning restitution down on the player actor. That might fix the "vibration."

    As far as rotation with interpolation, that all depends on what you're trying to accomplish with the gameplay.

    If you interolate it you could interpolate self.rotation to Random(0, 359). That'll rotate it to a random direction, but won't rotate it in a circle a few times.
  • RumiRumi Member, PRO Posts: 343
    Good idea, I'll try that right now!
  • RumiRumi Member, PRO Posts: 343
    Thank you! It worked!
Sign In or Register to comment.