Jump to content

A question about Non-Intentional Elastic Constraints (p2, box2d....)


clark
 Share

Recommended Posts

This is not down to just p2 physics. In 2009 when playing with Box2d in Flash I experienced the same thing.  So 2 techs with 2 independent code bases. 

Head over here to p2

 

https://schteppe.github.io/p2.js/demos/constraints.html

 

And spin the rope in a circular motion from the top non static shape, you will see the shapes go from this

ooooooooooo
 

to this

 

o o o o o o o o o o o o o o o 

 

The joints tear basically and become elastic.  Infact, any physics experiment I have wanted to play with suffers from this tearing joint problem.  Ball and Chains, having a spiderman shoot webs, ragdolls, even 2d cars if the landing is hard enough.

I asked Schteppe on Twitter what causes this and he said
 

Constraint solver failure probably. Or maybe something with the time step being too large.

 

 

I was looking into this, but I am having no real luck and I want to save him the pain of a twitter convo about it.
 

When we use a rigid body physics engine in our Virtual Machines, are we getting a close approximation of the original library (excl p2)? If I take a C++ Box2D codebase, it is clearly faster, perhaps no tearing occurs because perhaps it runs at 100 iterations.  But the best we can do is run it at 10 iterations due to performance concerns, and the cost of doing that is simply inaccuracy with constraints?

Edited:

If difficulty was no object. What is the best language out there with 2d physics and a 2d renderer in any accessible platform? If I wanted to make silly 2d physics toys, what do the big boys use?
 

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...