Hello,
I am currently experiencing a problem with my physx simulation application : physx handling is done with Bullet and 3D rendering by Ogre:
I am stacking kapla (keva) blocks and watch them fall.
A kapla block is simply a btRigidBody with mass 1 and friction set to 0.2, and its deactivationTime is set to 0, the world gravity is set to 10 downwards.
the blocks fall but the simulation stops with blocks not completely lying on the ground (the ground id a static plane body).
please find attached image files for simulation start, middle and end
On those image files, the wireframe part surrounding blocks is a debug draw for the btRigidBodies
Has anyone already experienced this kind of behavior ?
RigidBodies stop moving in strange positions
-
nigul
- Posts: 12
- Joined: Tue Sep 22, 2009 1:40 pm
RigidBodies stop moving in strange positions
You do not have the required permissions to view the files attached to this post.
-
jarno
- Posts: 57
- Joined: Tue Mar 16, 2010 1:42 am
Re: RigidBodies stop moving in strange positions
First make sure the centre of mass of the blocks is correctly positioned at the centre of each block. If it is at a corner then that could explain the blocks sticking up into the air.
You could also try disabling the deactivation of rigid bodies that have become stationary:
What can happen in a pile like that is that a rigid body gets stuck for a while before continuing to fall. If it remains stationary for too long (2 seconds I believe), then Bullet will assume it will no longer move and deactivate it.
---JvdL---
You could also try disabling the deactivation of rigid bodies that have become stationary:
Code: Select all
rigidbody->setActivationState(DISABLE_DEACTIVATION);
---JvdL---
-
nigul
- Posts: 12
- Joined: Tue Sep 22, 2009 1:40 pm
Re: RigidBodies stop moving in strange positions
Thanx, that works well, I even arrive to a better result using setSleepingThresholds.