Page 1 of 1

Collision detection in a large world

Posted: Tue May 04, 2010 7:10 am
by minghia
I have set up a spherical world with the radius of the sphere the radius of the earth. I am trying to place my vehicles using latitude, longitude and altitude from the surface of the sphere and then drive one into the other to simulate a collision. My vehicles are both potentially moving and I convert the position from latitude, longitude, altitude and heading to a btTransform. When I collide the two test vehicles the call to getNumManifolds is always returning 0 even though the objects are rather large (ship size) and the two position are approximately 5 m apart.

Does anyone have a small example which use geographic position of an object to perform collision detection?

Tony Vasile

Re: Collision detection in a large world

Posted: Tue May 04, 2010 8:20 am
by ola
Are you running Bullet compiled with the double-precision option? It's necessary for such large coordinates.

Re: Collision detection in a large world

Posted: Wed May 05, 2010 1:41 am
by minghia
Yes I am and my broadphase is of class btDbvtBroadphase.

Tony Vasile

Re: Collision detection in a large world

Posted: Fri May 07, 2010 5:08 am
by minghia
When you are only using a collision world and one is managing the position of your vehicles by just updating their associated transforms does the collision detection work out the one vehicle has gone through the other one or is the assumption that the vehicle has just teleported and any possible collision has not happened. That is I have one vehicle heading at the other one and when I incremented the position no collision is detected even though one update the vehicle is on the left of the stationary target and the next update it is on the right after having travelled on a path that takes it through the stationary vehicle.