NVIDIAGameWorks / PhysX-3.4

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

DySolverPFConstraints.solveFriction is not right if friction type is not ePatch #147

Open BackMountainBird opened 1 year ago

BackMountainBird commented 1 year ago

the issue happens if you change the friction type to eOne_Directional

this causes crash in DySolverPFConstraints.solveFriction

const PxU8* PX_RESTRICT last = ptr + getConstraintLength(desc);

the data is presumed to be

sizeof(SolverFrictionHeader) + sizeof(appliedImpulse) + numFrictionConstr * sizeof(SolverContactFriction)

and datas are consecutive

but it mismatches codes in DyContactPrepPF.setupFinalizeSolverConstraintsCoulomb。