Skip to content

Dynamic Spring Bone

Updated

One bone springs and overshoots: tails, jiggle.

Type
comp-dynamic-spring-bone
Script class
DynamicSpringBoneComponent
Per entity
Several
Version
2.0.0

Read about it in Dynamic bones: 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
damping 0 ≤ x ≤ 10000
mass 0.001 ≤ x ≤ 1000
stiffness 10 ≤ x ≤ 100000

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