• Advertisement
Sign in to follow this  

PhysX Raycast filtering

This topic is 2440 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having some problems filtering my raycasts. I am using the "SampleRaycast" example that comes with the PhysX SDK, and I am trying to get the horizontal raycast to ignore the terrain. What I've done is set the shape group to the terrain to 1 inside the "InitTerrain()" function like so:

NxActorDesc ActorDesc;
ActorDesc.shapes[0]->group = 1;
gScene->createActor(ActorDesc)->userData = (void*)0;

And I've set my raycast to group 2 like so: (RaycastAllShapes())

gScene->raycastAllShapes(worldRay, gMyReport, NX_ALL_SHAPES, 2);

Now I've been able to filter the cubes to pass right through the terrain, but I am having problems with the raycast and the terrain. Any ideas?


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement