Collision detection in a large world

Post Reply
minghia
Posts: 13
Joined: Wed Feb 24, 2010 5:46 am

Collision detection in a large world

Post by minghia » Tue May 04, 2010 7:10 am

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

ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway
Contact:

Re: Collision detection in a large world

Post by ola » Tue May 04, 2010 8:20 am

Are you running Bullet compiled with the double-precision option? It's necessary for such large coordinates.

minghia
Posts: 13
Joined: Wed Feb 24, 2010 5:46 am

Re: Collision detection in a large world

Post by minghia » Wed May 05, 2010 1:41 am

Yes I am and my broadphase is of class btDbvtBroadphase.

Tony Vasile

minghia
Posts: 13
Joined: Wed Feb 24, 2010 5:46 am

Re: Collision detection in a large world

Post by minghia » Fri May 07, 2010 5:08 am

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.

Post Reply