akadjoker / jiglibflash

Automatically exported from code.google.com/p/jiglibflash
0 stars 0 forks source link

Saw a collision reaction before an actual collision occurred #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps:
1. Create 20 rigid bodies of the same size and mass
2. friction = 0 (only damping), restitution = 1, limitAngVelocities = 0
3. Apply a force to a body to send it towards all other bodies

Expected: when a collision occurs between bodies, these react to each other
Actual: sometimes, bodies seem to react to each other before a collision occurs 
(visually), which looks like a body is 
pushing another one from a distance

Mac OS 10.5, Safari, JigLib r108

More info:
- Using pv3d
- The rigid body is not bigger than the pv3d object
- Using physics.engine.integrate()

I hope that this is enough info. I'm sorry I can't release a video recording 
without an NDA.

Original issue reported on code.google.com by afil...@gmail.com on 30 Oct 2009 at 5:14

GoogleCodeExporter commented 9 years ago
The cause of this problem is the collision system will detect beforehand if 
there is  a collision before actual 
collision. And by doing this, it can prevent the collision missing. So bodies 
seem to react to each other before a 
collision occurs. especially when bodies move fast.

Original comment by muzerly on 2 Nov 2009 at 3:33

GoogleCodeExporter commented 9 years ago
Is there any way to fix this? These early collisions occur when bodies are up 
to 50 pixels away.

Original comment by afil...@gmail.com on 2 Nov 2009 at 3:40

GoogleCodeExporter commented 9 years ago
no way, I'm afraid, unless to modify some codes of collision system.

Original comment by muzerly on 2 Nov 2009 at 4:06