sim.getContactInfo

Retrieves contact point information of a dynamic simulation pass.

Synopsis

list coll, list point, list rForce, list n = sim.getContactInfo(int dynamicPass, int objectHandle, int index) int[2] coll, float[3] point, float[3] rForce, float[3] n = sim.getContactInfo(int dynamicPass, int objectHandle, int index)

Arguments

  • dynamicPass: a specific dynamic sub-step index or sim.handle_all. By default a call to simHandleDynamics executes the dynamics engine x times, with x times smaller time steps (where x is a parameter that can be adjusted). At each of those sub-steps, contacts are created and destroyed. With the dynamicPass argument you can select which sub-step you wish to retrieve contacts from (zero-based index), or sim.handle_all to retrieve the contacts of all sub-steps. See also simGetInt32Param(sim.intparam_dynamic_step_divider).
  • objectHandle: handle of a specific object you wish to retrieve contacts from, or sim.handle_all to retrieve all contacts in the scene.
  • index: zero-based index of the contact to retrieve

Return values

  • coll: handles of the two objects contacting. The handles might also refer to particle objects that are not treated as regular scene objects
  • point: coordinates of the contact
  • rForce: vector that represents the force generated by the contact
  • n: normal vector at the contact point