Collide with Different Side of Lever for Different Rotate Direction

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
Hey again, so with this one I want to be able collide my actor with the right side of the lever and have it rotate clockwise, when the actor collides with the left side of the lever I want the lever to rotate counter clockwise. I have added boxes that are invisible above the lever to do this but I am pretty sure there must be a better way. Thanks!
SM

Comments

  • giacomopoppigiacomopoppi Member, PRO Posts: 914
    I'm not sure what you mean exactly, but i am sure you can try and constrain the limits of the lever:

    Rule
    ------
    when self.rotation <= "limit 1"
    Constrain attribute= self.rotation to "limit 1"
    ------
    when self.rotation >= "limit 2"
    Constrain attribute= self.rotation to "limit 2"
    ------
    You are going to also have to add some attributes or else the lever will remain blocked when constrained to the "limit 1-2".

    send me over the zipped project if you want me to do it for you ;)

    giacomopoppi@gmail.com
Sign In or Register to comment.