Docs

Joint3DComponent

The data a Joint3D is built from. In Lua, get it with joint:getJoint3DComponent().

Properties

Writing a component field

Some fields take effect only once the matching needUpdate… flag is set too. See Writing components directly.

Name Languages
type C++ | Lua
bodyA C++ | Lua
bodyB C++ | Lua
anchorA C++ | Lua
anchorB C++ | Lua
anchor C++ | Lua
axis C++ | Lua
normal C++ | Lua
twistAxis C++ | Lua
planeAxis C++ | Lua
axisX C++ | Lua
axisY C++ | Lua
limitsMin C++ | Lua
limitsMax C++ | Lua
normalHalfConeAngle C++ | Lua
planeHalfConeAngle C++ | Lua
twistMinAngle C++ | Lua
twistMaxAngle C++ | Lua
fixedPointA C++ | Lua
fixedPointB C++ | Lua
hingeA C++ | Lua
hingeB C++ | Lua
hinge C++ | Lua
slider C++ | Lua
numTeethGearA C++ | Lua
numTeethGearB C++ | Lua
numTeethRack C++ | Lua
numTeethGear C++ | Lua
rackLength C++ | Lua
motorState C++ | Lua
motorTargetVelocity C++ | Lua
motorTargetPosition C++ | Lua
motorFrequency C++ | Lua
motorDamping C++ | Lua
motorMaxForce C++ | Lua
pathPoints C++ | Lua
pathPosition C++ | Lua
isLooping C++ | Lua
autoAnchors C++ | Lua
needUpdateJoint C++ | Lua
needUpdateMotor C++ | Lua

The Joint3D setters fill these fields and build the joint. A joint whose bodies aren't ready, or a gear or rack whose hinge or slider isn't, is built by a later update. Removing or rebuilding a body takes its joints down, along with any gear or rack using them, until the body is back. While the scene runs, a joint rebuilt this way keeps the frames it had, so it comes back in the same rest pose; a path, gear, or rack joint, or one whose body's center of mass moved, is rebuilt from these fields instead. Set needUpdateJoint to rebuild it from these fields. pathPoints comes to Lua as a table copy. The motor… fields are described in Joint3D — Motors; after writing them, set needUpdateMotor to apply them to the built joint. needUpdateJoint would rebuild it instead, making its current pose the hinge's angle 0.