Joint2DComponent¶
The data a Joint2D is built from. In Lua, get it with joint:getJoint2DComponent().
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 |
axis |
C++ | Lua |
target |
C++ | Lua |
autoAnchors |
C++ | Lua |
rope |
C++ | Lua |
needUpdateJoint |
C++ | Lua |
The Joint2D setters fill these fields and build the joint. A joint set during a physics step is built by the next update. Removing or rebuilding a body takes its joints down until the body is back. Set needUpdateJoint to rebuild it from these fields.