Component · physics
Joint
Joint on a body; connection zero anchors to the world. Anchors/axes are world-space.
Fields
kind
JointKindConstraint primitive.
default "fixed"
One offixedhingesliderdistancepointsixDof
connectedBody
u64PhysicsId of the connected body; zero is the world.
default 0
anchorA
vec3Anchor on the connected body, or the world anchor.
default [0,0,0]m
anchorB
vec3Anchor on this entity's body.
default [0,0,0]m
axis
vec3Unit primary axis (hinge direction, slider direction, or frame X).
default [1,0,0]
normal
vec3Unit perpendicular normal (frame Y).
default [0,1,0]
translationMin
vec3Minimum XYZ translation; X is the slider/distance lower bound.
default [0,0,0]m
translationMax
vec3Maximum XYZ translation; X is the slider/distance upper bound.
default [0,0,0]m
rotationMin
vec3Minimum XYZ angular limits; X is the hinge lower bound.
default [0,0,0]rad-3.1415928 – 3.1415928
rotationMax
vec3Maximum XYZ angular limits; X is the hinge upper bound.
default [0,0,0]rad-3.1415928 – 3.1415928
Usage
Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.
Add it
ara do component.add -p entity=name:Crate -p component=Joint --why "Add Joint"Set a field
ara do property.set -p entity=name:Crate -p path=Joint.kind -p value="fixed" --why "Tune Joint"In a scene document
{
"Joint": {
"kind": "fixed"
}
}From C#
/// <summary>Move a hinge anchor to the top of a panel.</summary>
public static void UseJoint(Entity entity, in Tick tick)
{
ref var component = ref World.Get<Joint>(entity);
component.AnchorA = new Vector3(0, 0.5f, 0);
}From C#
Scripts read and write it with Get<Joint>(); see the Joint struct.