Skip to content

Physics Spherical Joint

Updated

Links the bodies in a group at one pivot, free to swing around it like a ball and socket.

Type
comp-physics-spherical-joint
Script class
PhysicsSphericalJointComponent
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
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(PhysicsSphericalJointComponent);
if (component) log(component.props);
}