simCheckCollisionEx

Checks whether two entities are colliding, and will return all intersections between the two entities. The collidable flags of the entities are overridden if the entities are objects

C++ synopsis

int simCheckCollisionEx(int entity1Handle, int entity2Handle, double** intersectionSegments)

Arguments

  • entity1Handle: handle of entity 1 (can be an object handle or a collection handle)
  • entity2Handle: handle of entity 2 (can be an object handle or a collection handle), or sim.handle_all to check entity1 against all other collidable objects
  • intersectionSegments: pointer to an array of double values that represent the intersections (segments) between the two entities (pt1(x,y,z), pt2(x,y,z), pt1(x,y,z), etc). This can be nullptr. The user should use simReleaseBuffer to delete the returned data. That data is only valid if return value is >0

Return

  • -1 in case of an error, otherwise the number of segments returned


See also: