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?
Can't find hit with btBoxShape objs using convexSweepTest
-
zkunda
- Posts: 6
- Joined: Mon Apr 19, 2010 12:59 pm
-
pico
- Posts: 229
- Joined: Sun Sep 30, 2007 7:58 am
Re: Can't find hit with btBoxShape objs using convexSweepTest
Hi,
maybe you ran into one of those issues:
http://code.google.com/p/bullet/issues/detail?id=347
http://code.google.com/p/bullet/issues/detail?id=292
maybe you ran into one of those issues:
http://code.google.com/p/bullet/issues/detail?id=347
http://code.google.com/p/bullet/issues/detail?id=292
-
zkunda
- Posts: 6
- Joined: Mon Apr 19, 2010 12:59 pm
Re: Can't find hit with btBoxShape objs using convexSweepTest
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.
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
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!
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!