Skip to content

Physics Prismatic Joint

Updated

Slider joint along one axis, like a drawer.

Type
comp-physics-prismatic-joint
Script class
PhysicsPrismaticJointComponent
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
anchor
anchor.x -10000 ≤ x ≤ 10000
anchor.y -10000 ≤ x ≤ 10000
anchor.z -10000 ≤ x ≤ 10000
axis.x
axis.y
axis.z

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(PhysicsPrismaticJointComponent);
if (component) log(component.props);
}