turnstile rotation with 90 degree stop

vegasmike1vegasmike1 Member Posts: 192
edited November -1 in Working with GS (Mac)
Ok imagine a turnstile, that can be put in motion from either side of the center point, and I want that action to stop when it reaches 90 degrees from where it is, so if it is pointing north, call it 0 or 360 and you hit the north potion of the actor it moves counter clock wise 90 degrees to 270, but if you hit the south side of the actor it turns 90 degrees clockwise, and stops. I have tried all kinds of things but it stays in motion as the object must be moveable with the obvious constraints on the position of the object. Anyone have any ideas or is my description too muddled.

Comments

  • Rob2Rob2 Member Posts: 2,402
    image does anti clockwise 90 degree steps
  • ORBZORBZ Member Posts: 1,304
    I haven't tried this but it seems to me that you would need to monitor the floor(self.rotation) and when it's at 0, 90, 180, or 270 stop the rotation by setting the angular velocity to 0.
  • vegasmike1vegasmike1 Member Posts: 192
    Orbz

    I sort of get what you are saying but not 100%, its not your thought, its my thinking. I will go and see if I can cook something up, wait this is salad, I will toss something up. Sheez
Sign In or Register to comment.