Brainache
Member
|
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 |
|
Brainache
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|