Regular API function

simCreateJoint / sim.createJoint

Description Creates a joint. See also sim.setJointInterval.
C synopsis simInt simCreateJoint(simInt jointType,simInt jointMode,simInt options,const simFloat* sizes,const simFloat* colorA,const simFloat* colorB)
C parameters
jointMode: a joint mode value
options: reserved. Set to 0.
sizes: pointer to 2 values indicating the joint length and diameter. Can be nullptr for default values
colorA: pointer to 4x3 values for joint color A (ambient_diffuse rgb, 3 reserved values (set to zero), specular rgb and emission rgb). Can be nullptr for default values
colorB: pointer to 4x3 values for joint color B (ambient_diffuse rgb, 3 reserved values (set to zero), specular rgb and emission rgb). Can be nullptr for default values
C return value
-1 if operation was not successful, otherwise the handle of the joint
Lua synopsis int jointHandle=sim.createJoint(int jointType,int jointMode,int options,table[2] sizes=nil,table[12] colorA=nil,table[12] colorB=nil)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart