Regular API function

simSetObjectQuaternion (RosPlugin API equivalent: simRosSetObjectQuaternion)

Description Sets the quaternion (x,y,z,w) of an object. Be very careful to set only valid value (i.e. normalized), otherwise you will experience strange effects. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling simResetDynamicObject just before). See also simSetObjectOrientation and the other matrix/transformation functions.
C synopsis simInt simSetObjectQuaternion(simInt objectHandle,simInt relativeToObjectHandle,const simFloat* quaternion)
C parameters
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame the orientation is specified. Specify -1 to set the absolute orientation, sim_handle_parent to set the orientation relative to the object's parent, or an object handle relative to whose reference frame the orientation is specified.
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 number result=simSetObjectQuaternion(number objectHandle,number relativeToObjectHandle,table_4 quaternion)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page