Collision detection of a point and a rigid body

sarbartha
Posts: 5
Joined: Fri Apr 19, 2013 5:18 am

Collision detection of a point and a rigid body

Post by sarbartha »

I have created a rigid body in bullet library using btConvexHullShape .

Now I want to check whether a point is inside the rigid body or not.

If it is inside the rigid body, what is the closest point outside the solid object where I can shift the point.

can anyone help me out?
xexuxjy
Posts: 225
Joined: Wed Jan 07, 2009 11:43 am
Location: London

Re: Collision detection of a point and a rigid body

Post by xexuxjy »

you could do a simple check on the bounding box of the body, if that passes then cast a ray out from your point and see if it hits the edge of the body?