sim.setObjectParent

Sets an object's parent object. Dynamically simulated objects, together with their hierarchy tree, are dynamically reset (this however does not apply to static shapes)

Synopsis

sim.setObjectParent(int objectHandle, int parentObjectHandle, bool keepInPlace) sim.setObjectParent(int objectHandle, int parentObjectHandle, bool keepInPlace)

Arguments

  • objectHandle: handle of the object that will become child of the parent object. Can be combined with sim.handleflag_assembly ((simply add sim.handleflag_assembly to objectHandle), if the two objects correspond to assembly items. In that case, parentObjectHandle can't be -1, and keepInPlace should be set to false
  • parentObjectHandle: handle of the object that will become parent, or -1 if the object should become parentless
  • keepInPlace: indicates whether the object's absolute position and orientation should stay same


See also: