Moving Triangle vs Moving Sphere

Please don't post Bullet support questions here, use the above forums instead.
DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Moving Triangle vs Moving Sphere

Post by DevO »

Probably this is common questions but what can some body suggest robust and stabe continuous collision between moving sphere and moving triangle?

Simple Ray vs Triangle do not work in this case.
Find plane and time where all 4 points are on the same plane do not work too becouse collision occur before the sphere is in the triangle...

Any ideay, links, papers or may be code?
Thanks,
DevO
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Moving Triangle vs Moving Sphere

Post by Erwin Coumans »

DevO wrote:Probably this is common questions but what can some body suggest robust and stabe continuous collision between moving sphere and moving triangle?

Simple Ray vs Triangle do not work in this case.
Find plane and time where all 4 points are on the same plane do not work too becouse collision occur before the sphere is in the triangle...

Any ideay, links, papers or may be code?
Thanks,
DevO
Bullet includes a general way to do continuous collision, between moving convex objects. It depends on how they move, which routine to take. Is the movement just translation, or is there also rotation?

The general moving convex-convex algorithm that Bullet uses is very efficient, so I can recommend that. It follows a paper by Gino van den Bergen, visit the http://www.dtecta.com/ website, goto 'interesting' and check out the 'raycasting against convex objects', which includes sphere-cast. If you need the rotational case too, you can use Bullet's btContinuousConvexCollision, as described in http://www.continuousphysics.com/Bullet ... ection.pdf

See Demos/ContinuousConvexCollision and Demos/GjkConvexCastDemo in Bullet 2.14 (or later). The pure-linear version is implemented in the SubsimplexCast: http://www.continuousphysics.com/Bullet ... xCast.html

Dave Eberly's geometric tools website might have a solution for the specific case: http://www.geometrictools.com
DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Post by DevO »

Thanks Erwin!
The main purpose is the collision in simple cloth engine, so thiriangles may rotate an even change it shape but not as much.

Gjk seems to be not robust if colliding big convex vs small one and a bit to expensive for this purpose.