Physics, need help with stacks of objects

0 favourites
  • 4 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi everybody,

    I'm facing an issue while creating a phyisics-based puzzle game: I need to create some stacks of square (more generally rectangular) boxes.

    The goal of the game is to destroy these boxes in a specific order to obtain things.. but this is OT

    I observed that something does not behave as expected when stacks are built. This is my example CAPX done with a Beta r112 release:

    Link to CAPX

    text mode: dropbox.com/s/c4j63gjzn6e17bt/physicsStack.capx

    As you can see, in the Layout 1, the first-left stack is self shaking while the geometry is the same of the second one.. Why?

    In the Layout 2 I tried a trick: I set the "immovable" property when the speed of the Master block (the one with the well-known Metallica's "M") is lower than a treshold level.

    Everytime a block is destroyed (or the master block is clicked) the physics is restored setting "movable" to every brick.

    It is a work-in-progress trick that doesn't solve, because everytime the property "movable" is set, every block try to fall and then they gain its own position again.

    I think every brick it feels itself as an infinite-mass object just for a short time when there is the 'immovable to movable' switch.

    After this chatterbox post, the question is: does someone know a way to avoid the self-shaking behavior of a stack of objects built up that way?

    Thanks in advance

    Hatsu Sakura

  • Take a look at the catapult game demo that comes with Construct. You'll need to edit the settings regarding physics stepping.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I moved the top block on the left stack up one pixel and it fixed it. It must have just been inside the other one causing a shake. It does shake a little bit, but stops pretty quick.

  • Dear all,

    thank you both for your tips

    EncryptedCow your fast tip could solve the issue for the 1st screen of the game, but after destroying one brick the problem come back in its own original size. But I really appreciated your kindness and the time you spent opening my example and trying to find a solution. So, thank you a lot! <img src="smileys/smiley2.gif" border="0" align="middle" />

    ..and the winner is !

    I had already played around with those settings trying to solve but I never put so high values (don't tell Ashley: I never opened the example you sohwed me.. <img src="smileys/smiley12.gif" border="0" align="middle" /> )

    So, putting higher values in the Physics engine, everything is now working fine!

    Thank you all guys.

    Have nice developings

    Hatsu Sakura

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