Problems with Rotation

dotsonj23dotsonj23 Member Posts: 316
edited November -1 in Working with GS (Mac)
So I want an actor to rotate at speed 200 clockwise when X linear velocity is > than 0. Then want it to rotate at speed 200 counter-clockwise when X linear velocity < than 0. Works most of the time when set up that way using Rules and Accelerate behavior but sometimes it just stops rotating either way, even when I know X linear velocity is greater than 0 since I checked with display text bahavior. Any ideas?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Try something like this
    Rule
    When self.motion.linearvelocity.x ≠ 0
    --Rule
    --When self.motion.linearvelocity.x > 0
    ----Rotate Clockwise
    --Otherwise
    ----Rotate Counter-Clockwise

    Let me know if that works for you.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • dotsonj23dotsonj23 Member Posts: 316
    Thanks. I'll try that after my kids go to bed and let you know if it works. Sounds like it might. I kept stripping out rules for my other complicated movements to see if they were the problem but finally got down to just the left right movement and rotate and it still did not work all the time. Hopefully this will work.
  • dotsonj23dotsonj23 Member Posts: 316
    tenrdrmer said:
    Try something like this
    Rule
    When self.motion.linearvelocity.x ≠ 0
    --Rule
    --When self.motion.linearvelocity.x > 0
    ----Rotate Clockwise
    --Otherwise
    ----Rotate Counter-Clockwise

    Let me know if that works for you.

    Not only did it work (even when I just placed in with my other set of complicated movement rules) but it fixed another issue I was having on another movement rule that I had thought was unrelated but apparently not. Thank you so much.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Glad to help.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
Sign In or Register to comment.