About Store Forum Documentation Contact



Post Reply 
Physics Sweep / Ray
Author Message
Brainache Offline
Member

Post: #1
Physics Sweep / Ray
Hello,

I am getting some odd results using the function below, sometimes it returns correctly, other time it does not detect collision... just want to make sure I'm using the sweep function correctly ( I get identical results using a ray cast from start to end as well tho )

The goal is to make sure the ball can move from start to end without colliding against anything...

If the function looks correct, i'll post some screenshots showing Im getting...


bool nodeRay(Vec start, Vec end)
{
PhysHit phit;
Vec move = end - start;
Ball ball(0.1f, start);
if ( Physics.sweep(ball, move, &phit) )
{
return true;
}
return false;
}


Another thought... will this detect backface collision? (ie: it may be that if start is inside a static, and end is outside the static... it doesnt detect the collision..)

Thanks!
08-20-2009 03:06 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #2
Re: Physics Sweep / Ray
Update... I have identified that the issue is the castRay and sweep function ignore back faces...

Is there a way to enable backface collision for physics tests?
08-20-2009 05:24 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
Re: Physics Sweep / Ray
this is PhysX controlled, and from what I know there is no support for backface sweeping

you can try thinking of testing Physics.cuts first
08-20-2009 07:20 PM
Find all posts by this user Quote this message in a reply
Post Reply