Ball Physics not working as expected
Posted: Mon Apr 14, 2014 7:09 pm
Hi,
I am new to Bullet and as a starting point thought I would get a ball rolling along a surface. I used the RollingFrictionDemo as a starting point, which worked fine. I then changed the btBoxShape to a btBvhTriangleMeshShape and set all the Y coordinates to 0.0.
All seems to work as expected when I apply an impulse to ball in a single axis.
However when I do:
I expected the ball to roll along the given vector until coming to rest as a result of the friction. However the ball starts to move along the vector and then stops moving in X and continues along the Z axis, as shown in XZ position plot below.
Can anyone tell me what is going on, or have I not set part of the physics engine correctly?
Thanks,
LtBrick
I am new to Bullet and as a starting point thought I would get a ball rolling along a surface. I used the RollingFrictionDemo as a starting point, which worked fine. I then changed the btBoxShape to a btBvhTriangleMeshShape and set all the Y coordinates to 0.0.
All seems to work as expected when I apply an impulse to ball in a single axis.
However when I do:
Code: Select all
body->applyCentralImpulse( btVector3( 1.0f, 0.f, -8.0f ) );
Can anyone tell me what is going on, or have I not set part of the physics engine correctly?
Thanks,
LtBrick