Can't find hit with btBoxShape objs using convexSweepTest

zkunda
Posts: 6
Joined: Mon Apr 19, 2010 12:59 pm

Can't find hit with btBoxShape objs using convexSweepTest

Post by zkunda »

I've searched forum for all night long.
When I add collision object which is a btBoxShape into btCollisionWorld, I can't get any hit using convexSweepTest().
But everything works great when I using btBvhTriangleMeshShape with the same object.
There's another post about the same problem, but no one gave an answer.
http://www.bulletphysics.org/Bullet/php ... est#p10915
Please help?
pico
Posts: 229
Joined: Sun Sep 30, 2007 7:58 am

Re: Can't find hit with btBoxShape objs using convexSweepTest

Post by pico »

zkunda
Posts: 6
Joined: Mon Apr 19, 2010 12:59 pm

Re: Can't find hit with btBoxShape objs using convexSweepTest

Post by zkunda »

Thanks pico, but my code didn't fall into those situations.
I know that if I move one of the btBvhTriangleMeshShape in my collision world, I must call btCollisionWorld::updateAABBs() before I call btCollisionWorld::convexSweepTest(). But my capsule won't hit any btBoxShape in the collision world.
zkunda
Posts: 6
Joined: Mon Apr 19, 2010 12:59 pm

Re: Can't find hit with btBoxShape objs using convexSweepTest

Post by zkunda »

Oh god!
My client gave me a box size (10, 20, -20) and I haven't checked that.
Bullet uses right hand coordinate system when my engine uses left hand. Almost every vector3 value should be converted before sending to bullet. But !!!! SIZE value shouldn't be converted!

Sorry for my stupid mistake!