Sign in to follow this  

PhysX Raycast filtering

This topic is 2346 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:

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

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

[code]
gScene->raycastAllShapes(worldRay, gMyReport, NX_ALL_SHAPES, 2);
[/code]

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?

Thanks.

Share this post


Link to post
Share on other sites

This topic is 2346 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this