Regular API function

simGetObjectOrientation (remote API equivalent: simxGetObjectOrientation)

Description Retrieves the orientation (Euler angles) of an object. See also simGetObjectQuaternion, simSetObjectOrientation, simGetObjectPosition, simGetObjectMatrix and the other matrix/transformation functions.
C synopsis simInt simGetObjectOrientation(simInt objectHandle,simInt relativeToObjectHandle,simFloat* eulerAngles)
C parameters
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame we want the orientation. Specify -1 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.
eulerAngles: Euler angles (alpha, beta and gamma)
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis table_3 eulerAngles=simGetObjectOrientation(number objectHandle,number relativeToObjectHandle)
Lua parameters
Same as C-function
Lua return values
eulerAngles: table of 3 values (Euler angles) or nil in case of an error

All regular API functions on one page