Regular API function

simGetObjectQuaternion / sim.getObjectQuaternion

Description Retrieves the quaternion (x,y,z,w) of an object. See also sim.getObjectOrientation, sim.getObjectMatrix and the other matrix/transformation functions.
C synopsis simInt simGetObjectQuaternion(simInt objectHandle,simInt relativeToObjectHandle,simFloat* quaternion)
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.
quaternion: the quaternion (x,y,z,w)
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis table_4 quaternion=sim.getObjectQuaternion(number objectHandle,number relativeToObjectHandle)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
Legacy remote API: simxGetObjectQuaternion

All regular API functions on one page