How do I optimize physic blocks

  • Hi,

    i'm making a falling blocks game and i'm using physic behaviour for the blocks and the ground. But results are not totally good. Blocks bounce too much and when are over other blocks they start shaking and moving ruining the game. I have tryid also Chipmunks physic behaviour but blocks fall too quicky. Is there some configurations for use physic behaviour in the right way?

    Thanks!

  • My blocks still shake! Why?

  • Hard to say without seeing a capx, but I would suggest having a play around with the density, friction and elasticity; probably the last one would be best to adjust first - try setting it to 0 and see what happens.

    Also reduce the number of blocks you are using to 2 or 3 - check whether you get the same issue with a small number first, fix that and then scale up.

  • Thanks for reply, I have setted 0 for elasticity, 1 for friction and 200 for density. When a block fall near the edge of the block behind, it starts shaking moving all the tower...

  • Try a higher friction setting, and also make sure your collision boxes are completely straight

    ~Sol

  • Friction is 1 that is the max, and collision boxes are straight... I will attach a capx maybe is better.

  • Here a video of the problem

    https://youtu.be/DynhTjoRM3Q

  • markuzz78 I'm having trouble replicating the issue. Here's a capx that uses the initial physics settings and seems to work fine:

    https://www.dropbox.com/s/pzksidy6czai3 ... .capx?dl=0

    If you supply the capx maybe we can get to the root of the problem.

  • Here a video of the problem

    https://youtu.be/DynhTjoRM3Q

    I dunno why, but that made me laugh xD

    I have no idea why it could be doing that, unless perhaps your collision masks are slightly crooked? Are you using a custom collision polygon or just bounding box mode set to whole sprite from the physics object options?

    *EDIT*

    I tried to download your project to check, but it's not saved as a single project file - which makes it a little hard to download properly.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had that same problem with another game of mine.

    Try turning off the gravity and using Forces. The problem with gravity in C2 is the density component seems to be screwing up the results you want to apply forces yourself. See what works best for you.

  • > Here a video of the problem

    >

    > https://youtu.be/DynhTjoRM3Q

    >

    I dunno why, but that made me laugh xD

    I have no idea why it could be doing that, unless perhaps your collision masks are slightly crooked? Are you using a custom collision polygon or just bounding box mode set to whole sprite from the physics object options?

    *EDIT*

    I tried to download your project to check, but it's not saved as a single project file - which makes it a little hard to download properly.

    ~Sol

    It's saved in google drive in .capx format, you have simply to press the blue arrow on top right of the screen to download it.

  • >

    > > Here a video of the problem

    > >

    > > https://youtu.be/DynhTjoRM3Q

    > >

    >

    > I dunno why, but that made me laugh xD

    >

    > I have no idea why it could be doing that, unless perhaps your collision masks are slightly crooked? Are you using a custom collision polygon or just bounding box mode set to whole sprite from the physics object options?

    >

    > *EDIT*

    > I tried to download your project to check, but it's not saved as a single project file - which makes it a little hard to download properly.

    >

    > ~Sol

    >

    It's saved in google drive in .capx format, you have simply to press the blue arrow on top right of the screen to download it.

    Well I feel like a dumbass now lol... you can tell I don't use google drive very often. I didn't realise it was just showing the contents of the capx.

    ~Sol

  • I had that same problem with another game of mine.

    Try turning off the gravity and using Forces. The problem with gravity in C2 is the density component seems to be screwing up the results you want to apply forces yourself. See what works best for you.

    Do you have an example?

  • > I had that same problem with another game of mine.

    > Try turning off the gravity and using Forces. The problem with gravity in C2 is the density component seems to be screwing up the results you want to apply forces yourself. See what works best for you.

    >

    Do you have an example?

    https://app.box.com/s/l3stzikw12kwlxv4gh0o

    Here. This is Yann's capx.

    Just modify the gravity angle to fit your needs.

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