Greetings,
We have a problem with PhysX raycasts missing a lot, even in obvious places. Please see this video (use fullsceen for detail):
This is our test scene, height map and a few kinematic actors. Purple is visualisation data from PxScene, red ball is drawn on raycast hitpoint. (Terrain tag is our old slow heighmap raycast)
As you can see, most of raycasts fail and miss both heightfield and buildings. However, when they succeed, they are correct.
This is how raycast is called:
physx::PxRaycastBuffer buffer;
if ( m_Scene->raycast( position,direction, 1e7, buffer ) )
{
hit = toGlm( buffer.block.position );
return true;
}
return false;
And Image from PVD:
As you can see, both visualisation data and PVD show that all actors are present.
Has anyone seen similar problem? Any ideas what are we doing wrong?
Thanks