NVIDIAGameWorks / PhysX-3.4

NVIDIA PhysX SDK 3.4
https://www.nvidia.com/
2.35k stars 274 forks source link

Rigid body with capsule shape do not correctly collides with plane actor #10

Closed lukashrcka123 closed 7 years ago

lukashrcka123 commented 7 years ago

This happens only when PCM contact generation is enabled. After re-enabling legacy contact generation by clearing the _PxSceneFlag::eENABLEPCM flag, everything works fine.

michellelu-nvidia commented 7 years ago

Hi

Could please provide more details about this issue so that we can try to repro it?

lukashrcka123 commented 7 years ago

Hi Please check out this video ( https://www.youtube.com/watch?v=CCfKKCfXisQ&feature=youtu.be ), and notice that strange rollback of the capsule on the inclined plane.

Also when you try to recive contact point information, reported results seem to be a little bit odd. physx_capsuleplanecontactpoints

As you can see on the picture, contact points provided for the capsule-plane pair are placed on the opposite side of the capsule shape. As I noticed before, this happens only with PCM enabled.

My scene description is as follows:

physx::PxSceneDesc sceneDescrition(_physx->getTolerancesScale()); sceneDescrition.gravity = physx::PxVec3(0, -Constants::GravityAcceleration(), 0); sceneDescrition.cpuDispatcher = physx::PxDefaultCpuDispatcherCreate(4); sceneDescrition.filterShader = CollisionFilterShader::Filter; sceneDescrition.simulationEventCallback = &PhysicsSimulationEventCallback::Instance; sceneDescrition.gpuDispatcher = _cudaContextManager->getGpuDispatcher(); sceneDescrition.flags |= physx::PxSceneFlag::eENABLE_KINEMATIC_PAIRS; sceneDescrition.flags |= physx::PxSceneFlag::eENABLE_KINEMATIC_STATIC_PAIRS; sceneDescrition.flags |= physx::PxSceneFlag::eENABLE_GPU_DYNAMICS; sceneDescrition.flags |= physx::PxSceneFlag::eENABLE_PCM; sceneDescrition.flags |= physx::PxSceneFlag::eENABLE_STABILIZATION; sceneDescrition.broadPhaseType = physx::PxBroadPhaseType::eGPU; sceneDescrition.gpuMaxNumPartitions = 8; _scene = _physx->createScene(sceneDescrition);

PierreTerdiman commented 7 years ago

Thank you for the bug report. A fix has been submitted to our trunk and should eventually appear in GitHub.

sschirm commented 7 years ago

Assuming the bug has been fixed.