rotating actor

tim13211tim13211 Member Posts: 87
edited November -1 in Working with GS (Mac)
I have an actor that is a long rectangle. how can i make it rotate and stay constrained in the middle even when something collides with it?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Create a self attribtute call start.y and start.x

    Then place at the top of your actor change attribtue
    start.x to self.position.x and start.y to self.position.y

    Then two constrains Self.postion.x to start.x and self.position.y to start.y

    Then you could make your actor rotate a number of ways. one nice smooth one being a rule

    When self.rotation = 0
    --interpolate self.rotation to 360 and then you can use the duration to set the speed. if you want to go the other way use -360 instead of 360.

    You could also avoid a lot of the change and constrains if you uncheck moveable but sometimes that messes with the physics of the other actors that interact with the rotating platform.

    ___________________________________________________________________________________
    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!! Now only $20
    Expanding Option Menu Template HERE!!
    AppSolute Entertainment on iTunes
    AppSolute Entertainment on Facebook
  • tim13211tim13211 Member Posts: 87
    cool, thanks! I actually just figured it out after I posted ;D
Sign In or Register to comment.