implement rudimentary contact callback. Does PhysX have a way to report ALL contact points, every frame, so we can update contact forces etc, and report all contacts?

This commit is contained in:
erwincoumans
2019-02-20 21:38:37 -08:00
parent adf31c8f64
commit 3bf27cf8f2
5 changed files with 178 additions and 13 deletions

View File

@@ -45,5 +45,7 @@ while (1):
p.setJointMotorControl2(door,1,p.POSITION_CONTROL, targetPosition = angle, positionGain=10.1, velocityGain=1, force=11.001)
else:
p.setJointMotorControl2(door,1,p.VELOCITY_CONTROL, targetVelocity=1, force=1011)
contacts = p.getContactPoints()
print("contacts=",contacts)
p.stepSimulation()
time.sleep(1./240.)