Page 1 of 1

Margin and penetration depth getClosestPoints & consistency w/ visual

Posted: Fri May 21, 2021 10:23 am
by TestTest123
Hi,

assuming I have got two convex meshes close to or penetrating each other (e.g. after setting joint positions), I would like to ask how getClosestPoints handles
  • the collision margin when penetrating, i.e. negative contactDistances. In the case of getDynamicsInfo returning a collision margin of 0.001 do I simply have to add 0.002m to the calculated distance every time? I can't investigate this with simple spheres since a margin of 1 is returned for them.
  • Could you please help me to understand why the margin is required from a technical point of view?
  • Is it right that I can't trust the visualization too much when looking at exact contacts/distances between the two meshes? At least for sphere primitives this is true.
Thank you already in advance! Help is very appreciated.

Best regards!