Regular API function

simSetJointTargetPosition / sim.setJointTargetPosition

Description Sets the target position of a joint if the joint is in torque/force mode (also make sure that the joint's motor and position control are enabled). See also sim.getJointTargetPosition and sim.setJointPosition.
C synopsis simInt simSetJointTargetPosition(simInt objectHandle,simFloat targetPosition)
C parameters
objectHandle: handle of the joint object
targetPosition: target position of the joint (angular or linear value depending on the joint type)
C return value
-1 if operation was not successful
Lua synopsis sim.setJointTargetPosition(int objectHandle,float targetPosition)
Lua parameters
Similar to the C-function counterpart
Lua return values
none
Remote API equiv.
B0-based remote API: simxSetJointTargetPosition
Legacy remote API: simxSetJointTargetPosition