Skip to content

Physics Revolute Joint

Updated

Hinge joint, like a door.

Type
comp-physics-revolute-joint
Script class
PhysicsRevoluteJointComponent
Per entity
One
Version
2.0.0

Read about it in Joints: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
axis.x
axis.y
axis.z
pivot
pivot.x -10000 ≤ x ≤ 10000
pivot.y -10000 ≤ x ≤ 10000
pivot.z -10000 ≤ x ≤ 10000

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(PhysicsRevoluteJointComponent);
if (component) log(component.props);
}