Shaking?

memski425memski425 Member Posts: 19
edited August 2012 in Working with GS (Mac)
Hi,
when my actor collides with the ground i made it starts shaking and moving on the ground. All my collision rules are made. i am not sure if it is a bug or a rule that is wrong

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    I'm not sure if it's the same problem, but I had something similar once and solved it this way:

    http://www.jamie-cross.net/?p=272

    Jamie
  • ORBZORBZ Member Posts: 1,304
    What you are experiencing is physics engine jitter. i.e. noise from very small values being computed as the speed of the object approaches, but never quite reaches zero.

    Solution:

    Track the speed of the object, when it's really really low force it to stop:

    Constrain self.speed (real) = magnitude(linearVelX, linearVelY)

    rule speed < 10
    -- Change Velocity: 0

    Alternatively, sometimes instead of Change Velocity you want to override any forces acting on the object (like gravity) in that case you can use a Move Behavior, type: Stacked, speed: 0 to override the other forces.

    But for most cases Change Velocity will due.



  • I don't suppose there is a slightly more detailed version of your fix somewhere is there ORBZ? I think I understand what you're trying to say, but I'm not 100% clear.
  • I guess I'll clarify slightly. I've tried the solution above, but it doesn't seem to work well for my situation.

    I have an actor that moves around in the world.

    I have containing walls around the scene to keep the player from escaping the world.

    When I push the player character against the wall (holding down the movement key) the actor "jitters" rather than just coming to a stop.

    Please help me GameSalad-Kenobi. You're my only hope.
  • NVM. I ended up getting it fixed. All the settings with your suggestion was great ORBZ, but I had to make one more change to get it to work properly. I had to change the "bounciness" on my wall actor to 0. That did the trick.
  • ericzingelerericzingeler Member Posts: 334
    edited March 2013
    The move 0 with stacked resolved this issue for me. Thanks!
  • ProjectorXProjectorX Member Posts: 45
    Try turning down the bounciness.
Sign In or Register to comment.