Jump to content

Calming My Physics


iamchairs
 Share

Recommended Posts

I am using Pixi.js and a Matter.js for my physics engine. Just doing some tests combining both. I am trying to make a soft bodied shark and started by making the body. To do this I have a set of rectangles joined by some constraints. This gets close to the affect i'm looking for, but the physics are jumpy and never finally rest. Hopefully this is general enough and not specific to the physics engine I'm using. I had similar problems with Phaser2 ninja physics before. Here is a gif of what it looks like-

Sep_05_2016_19_31_51.gif

The greenish rectangles are the actual physics objects. You can see the the rects in the back just can't rest and vibrate the rest of the objects. I've tinkered with the friction as well as restitution.

If you saw this- what would you try to get this objects to rest?

Link to comment
Share on other sites

I've had similar issues with p2.js before, the only solution was to use the 'sleep' feature of p2 whereby bodies enter a sleep state if they fall below certain movement thresholds.

Don't know if matter.js has a similar feature, but if so that could be the answer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...