How do I stop physics objects from shaking?

0 favourites
  • 6 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • I am making a game in which a bunch of blocks fall down into a grid. The player then has to make matches of 3 or more of like color, similar to Bejeweled or Candy Crush Saga.

    When my blocks fall into the grid, I want them to accelerate and bounce, so I gave them a Physics behavior. They bounce nicely, but some of them will never come to a complete stop. They continue shaking and vibrating forever. The vibration is very small, maybe just 1 pixel up an down, but since the object never comes to a complete rest, the Physics behavior continues to be active forever.

    Is there a way to stop the blocks from shaking?

  • Have you tried using the physics actions Physics enabled/disabled?

    Once the object reaches its destination grid space, or stops moving in Y values, or whatever have it set the objects physics to disabled and turn them back on again when they are needed to drop again.

  • You may want to look into moving the blocks around using a plugin like "Litetween" instead of using physics. It may be easier to control exactly the shapes, and be overall higher performance.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Or you could use Chipmunk Physics behavior and set the sleep threshold.

  • Using physics for something like this does seem overkill, bullet-behaviour with gravity would do just about the same.

    My guess is you should check your collision-polygons or set collision-mode to bounding box.

  • Thanks for the useful responses! I will look into using non-physics alternatives to improve the performance of the falling blocks. Either that, or disable physics once each block reaches its destination.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)