Jump to content
  • Advertisement
Sign in to follow this  
Alundra

[PhysX 3.3.4] Filter shader issue with trigger

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!