Skeleton
Updated
Lets scripts read and pose this model’s bones, with optional humanoid bone mapping and limb chains. Shows the skeleton while the entity is selected.
- Type
comp-skeleton- Script class
SkeletonComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Skeleton and morphs: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Turn an avatar's head through its humanoid rigA Skeleton component with a humanoid rig resolves Amelia's bones into humanoid roles. The script asks it for the head and the right arm by role, not by bone name, and makes her look around and wave.
Watch Amelia turn her head and wave; the log lists the bones the rig resolved. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(SkeletonComponent); if (component) log(component.props);}