Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · physics

Joint

Joint on a body; connection zero anchors to the world. Anchors/axes are world-space.

Fields

Constraint primitive.
default "fixed"

One offixedhingesliderdistancepointsixDof

connectedBody

u64
PhysicsId of the connected body; zero is the world.
default 0

anchorA

vec3
Anchor on the connected body, or the world anchor.
default [0,0,0]m

anchorB

vec3
Anchor on this entity's body.
default [0,0,0]m

axis

vec3
Unit primary axis (hinge direction, slider direction, or frame X).
default [1,0,0]

normal

vec3
Unit perpendicular normal (frame Y).
default [0,1,0]

translationMin

vec3
Minimum XYZ translation; X is the slider/distance lower bound.
default [0,0,0]m

translationMax

vec3
Maximum XYZ translation; X is the slider/distance upper bound.
default [0,0,0]m

rotationMin

vec3
Minimum XYZ angular limits; X is the hinge lower bound.
default [0,0,0]rad-3.1415928 – 3.1415928

rotationMax

vec3
Maximum 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.