Regular API function

simSetObjectMatrix / sim.setObjectMatrix

Description Sets the transformation matrix of an object. Dynamically simulated objects, together with their hierarchy tree, will be dynamically reset (this however does not apply to static shapes). See also sim.getObjectMatrix and the section about positions, orientations and transformations
C/C++
synopsis
simInt simSetObjectMatrix(simInt objectHandle,simInt relativeToObjectHandle,const simFloat* matrix)
C/C++
parameters
objectHandle: handle of the object. Can be combined with sim.handleflag_reljointbaseframe (see next argument)
relativeToObjectHandle: indicates relative to which reference frame the matrix is specified. Specify sim.handle_world to set the absolute transformation matrix, sim.handle_inverse to set the inverse of the absolute transformation matrix, sim.handle_parent to set the transformation matrix relative to the object's parent, or an object handle relative to whose reference frame the transformation matrix is specified. If this handle is the handle of a joint, then the matrix is applied relative to the joint's moving frame (unless objectHandle is combined with sim.handleflag_reljointbaseframe, in which case the matrix is applied relative to the joint's base frame).
matrix: pointer to 12 simFloat values
C/C++
return value
-1 if operation was not successful
Lua
synopsis
sim.setObjectMatrix(int objectHandle,int relativeToObjectHandle,float[12] matrix)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Python
synopsis
sim.setObjectMatrix(int objectHandle,int relativeToObjectHandle,list matrix)

<