Hi Everyone,
I've currently got 3 boxes that fall from a fixed height (under gravity only) that collide with a flat plane (static).
The boxes fall down under gravity alright ( to make a pyramid shape) however the top box, after colliding
with the bottom boxes will float up very slowly before floating back down into a fixed position (total about 30-40 seconds)
any ideas why this is happening and how to get it to stop?
Thank you
Collision Bouncing/Floating
-
- Posts: 28
- Joined: Tue Jan 05, 2010 12:41 pm
Re: Collision Bouncing/Floating
Hi,
please, read chapter 12 (and the other chapters is also highly recommended to read) if it involves your case:
http://www.continuousphysics.com/ftp/pu ... Manual.pdf
BR.
please, read chapter 12 (and the other chapters is also highly recommended to read) if it involves your case:
http://www.continuousphysics.com/ftp/pu ... Manual.pdf
BR.
-
- Posts: 28
- Joined: Tue Jan 05, 2010 12:41 pm
Re: Collision Bouncing/Floating
Hi,
and read carefully the samples. This seems never to happen to me. Pay attention on the order you crate the Dynamic world and add bodies there.
and read carefully the samples. This seems never to happen to me. Pay attention on the order you crate the Dynamic world and add bodies there.
-
- Posts: 11
- Joined: Mon Jan 04, 2010 5:48 am
Re: Collision Bouncing/Floating
Hi,
I've read all the materials and the samples, the problem I have it seems is a little more complex than I originally described it.
Turns out all the collisions work fine, just go a bit slow, which I fixed by adjusting the TimeStep in the simulation, but I still get
boxes floating (not falling under gravity) outside a certain radius of only about 5 metres, even though the collision system
is set to Broad phase with worldAabbMin/Max(-+10000,+-10000,+-10000);
I've read all the materials and the samples, the problem I have it seems is a little more complex than I originally described it.
Turns out all the collisions work fine, just go a bit slow, which I fixed by adjusting the TimeStep in the simulation, but I still get
boxes floating (not falling under gravity) outside a certain radius of only about 5 metres, even though the collision system
is set to Broad phase with worldAabbMin/Max(-+10000,+-10000,+-10000);
-
- Posts: 28
- Joined: Tue Jan 05, 2010 12:41 pm
Re: Collision Bouncing/Floating
Hi,
I'd recommend to use the Demo Application inheritance and Debug Drawer (sorry, can't remember the name correctly). It's the application on which all the demos are based. It draws the objects correctly. I've got some troubles when the created objects were overlapped, so they behaved way out of natural. So, please try to use the Demo Application from the Samples directory.
I'd recommend to use the Demo Application inheritance and Debug Drawer (sorry, can't remember the name correctly). It's the application on which all the demos are based. It draws the objects correctly. I've got some troubles when the created objects were overlapped, so they behaved way out of natural. So, please try to use the Demo Application from the Samples directory.
-
- Posts: 28
- Joined: Tue Jan 05, 2010 12:41 pm
Re: Collision Bouncing/Floating
Hi,
the application is Basic Demo, here is how the Debug Drawer has to be invoked (BasicDemo.cpp):
void BasicDemo::clientMoveAndDisplay()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//simple dynamics world doesn't handle fixed-time-stepping
float ms = getDeltaTimeMicroseconds();
///step the simulation
if (m_dynamicsWorld)
{
m_dynamicsWorld->stepSimulation(ms / 1000000.f);
//optional but useful: debug drawing
m_dynamicsWorld->debugDrawWorld();
}
renderme();
glFlush();
glutSwapBuffers();
}
the application is Basic Demo, here is how the Debug Drawer has to be invoked (BasicDemo.cpp):
void BasicDemo::clientMoveAndDisplay()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//simple dynamics world doesn't handle fixed-time-stepping
float ms = getDeltaTimeMicroseconds();
///step the simulation
if (m_dynamicsWorld)
{
m_dynamicsWorld->stepSimulation(ms / 1000000.f);
//optional but useful: debug drawing
m_dynamicsWorld->debugDrawWorld();
}
renderme();
glFlush();
glutSwapBuffers();
}
-
- Posts: 11
- Joined: Mon Jan 04, 2010 5:48 am
Re: Collision Bouncing/Floating
Hi,
Thanks for all your help, I found out what was happening with my simulation.
I'm running Bullet in openRAVE and consequently managed to get the axis alignment completely wrong, my visualiser
was hence running back to front, so the box wasn't actually floating, it was sitting upon a plane that was sitting there, but
not displayed in the correct position.
The slowing of the simulation also came about due to the large number of TriMesh collisions I had going on, hence the boxes
were bouncing really really slowly.
Thanks for all your help, I found out what was happening with my simulation.
I'm running Bullet in openRAVE and consequently managed to get the axis alignment completely wrong, my visualiser
was hence running back to front, so the box wasn't actually floating, it was sitting upon a plane that was sitting there, but
not displayed in the correct position.
The slowing of the simulation also came about due to the large number of TriMesh collisions I had going on, hence the boxes
were bouncing really really slowly.