Regular API function

simSetObjectOrientation / sim.setObjectOrientation

Description Sets the orientation (Euler angles) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before). See also sim.setObjectQuaternion, sim.getObjectOrientation, sim.setObjectPosition, sim.setObjectMatrix and the other matrix/transformation functions.
C synopsis simInt simSetObjectOrientation(simInt objectHandle,simInt relativeToObjectHandle,const simFloat* eulerAngles)
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.
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 number result=sim.setObjectOrientation(number objectHandle,number relativeToObjectHandle,table_3 eulerAngles)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxSetObjectOrientation
Legacy remote API: simxSetObjectOrientation

All regular API functions on one page