Regular API function


Description Retrieves the quaternion (x,y,z,w) of an object. See also simGetObjectOrientation, simGetObjectMatrix 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=simGetObjectQuaternion(number objectHandle,number relativeToObjectHandle)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page