Regular API function

simGetObjectOrientation / sim.getObjectOrientation

Description Retrieves the orientation (Euler angles) of an object. See also sim.setObjectOrientation and the section about positions, orientations and transformations
C/C++
synopsis
simInt simGetObjectOrientation(simInt objectHandle,simInt relativeToObjectHandle,simFloat* eulerAngles)
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 we want the orientation. Specify sim.handle_world to retrieve the absolute orientation, sim.handle_parent to retrieve the orientation relative to the object's parent, or an object handle relative to whose reference frame you want the orientation. If this handle is the handle of a joint, then the orientation relative to the joint's moving frame will be returned (unless objectHandle is combined with sim.handleflag_reljointbaseframe, in which case the orientation relative to the joint's base frame will be returned).
eulerAngles: Euler angles (alpha, beta and gamma)
C/C++
return value
-1 if operation was not successful
Lua
synopsis
float[3] eulerAngles=sim.getObjectOrientation(int objectHandle,int relativeToObjectHandle)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
list eulerAngles=sim.getObjectOrientation(int objectHandle,int relativeToObjectHandle)