NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK
Other
3.11k stars 793 forks source link

set kine-kine flag is not working #650

Closed Durumyisking closed 7 months ago

Durumyisking commented 9 months ago

q1 I set the kinekineFilteringMode to "Keep" when creating the PxScene. (When I later called scene.getkinekinefilteringmode(), it correctly returned "Keep" even when I had set it to "Kill" or something else.)

q2 When specifying the actor type as "kinematic," I set the RigidDynamic.setRigidBodyFlags to "Kinematic" and enabled "eForceKineKineNotification."

q3 q4 However, it is not recognized in PVD (PhysX Visual Debugger). The values I had set are correctly retrieved in the Visual Studio debugger. (The behavior in the game also does not follow my intentions, as it only checks collisions between kinematic and static objects, but not between kinematic objects.)

q6 I changed the shape's flag to a trigger shape.

q5 This is the custom filter shader I created for the creation of the PxScene. It inherits from PxQueryFilterCallback.

q7 This is the part that handles callback processing when collisions occur. It inherits from PxSimulationEventCallback. (When there is a collision between static and kinematic objects, it correctly enters the if (pair.status & PxPairFlag::eNOTIFY_TOUCH_FOUND) flag. However, when there is a collision between kinematic objects, it does not enter the onTrigger function itself.)

vreutskyy commented 7 months ago

Hello. Sorry I didn't understand if your PlayerFilter shader function gets called for the kinematic bodies pair or not? It seems it should. Then you just need to set some PxPairFlag::eNOTIFY_* flags to get onContact() callback called for this pair. Or do I miss something?

preist-nvidia commented 7 months ago

Closing for now. Please reopen if you get a chance to respond. Internal PX-4433.