Jump to content
  • Advertisement
Sign in to follow this  
Alundra

[PhysX 3.3.4] Filter shader issue with trigger

This topic is 485 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

Hi,
I have this warning when my character enter in one box trigger :

warning : Trigger pairs do not support PxPairFlag::eNOTIFY_TOUCH_PERSISTS events any longer.

Here my filter shader :

physx::PxFilterFlags ContactReportFilterShader( physx::PxFilterObjectAttributes attributes0, physx::PxFilterData filterData0, physx::PxFilterObjectAttributes attributes1, physx::PxFilterData filterData1, physx::PxPairFlags& pairFlags, const void* constantBlock, physx::PxU32 constantBlockSize )
{
  pairFlags = physx::PxPairFlag::eCONTACT_DEFAULT | physx::PxPairFlag::eTRIGGER_DEFAULT | physx::PxPairFlag::eNOTIFY_TOUCH_PERSISTS | physx::PxPairFlag::eNOTIFY_CONTACT_POINTS;
  return physx::PxFilterFlag::eDEFAULT;
}

Is it possible to have more informations and how correct this filter shader to have it correct ?
Thanks

EDIT:
I modified the filter shader like that :

physx::PxFilterFlags ContactReportFilterShader( physx::PxFilterObjectAttributes attributes0, physx::PxFilterData filterData0, physx::PxFilterObjectAttributes attributes1, physx::PxFilterData filterData1, physx::PxPairFlags& pairFlags, const void* constantBlock, physx::PxU32 constantBlockSize )
{
  if( physx::PxFilterObjectIsTrigger( attributes0 ) || physx::PxFilterObjectIsTrigger( attributes1 ) )
    pairFlags = physx::PxPairFlag::eTRIGGER_DEFAULT;
  else
    pairFlags = physx::PxPairFlag::eCONTACT_DEFAULT | physx::PxPairFlag::eNOTIFY_TOUCH_PERSISTS | physx::PxPairFlag::eNOTIFY_CONTACT_POINTS;
  return physx::PxFilterFlag::eDEFAULT;
}

I don't have a big experience of the filter shader in PhysX, so I would have a confirmation it's the correct way.
The warning is not there anymore and I don't have issue on my current tests.

Edited by Alundra

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!