Contents

SkeletonResource.Joint

Describes a single joint of a Skeleton

Declaration

struct Joint

Overview

Joints form the hierarchical structure of a skeleton. Each joint has a unique name, a rest pose transform relative to its parent, and an optional list of child joints. The hierarchy is expressed through nesting using the JointBuilder result builder.

typealias Joint = SkeletonResource.Joint
// Create a simple arm hierarchy
let arm = try Joint("shoulder") {
    try Joint("upperArm", restPoseTransform: Transform(translation: [0, -0.3, 0])) {
        try Joint("forearm", restPoseTransform: Transform(translation: [0, -0.3, 0]))
    }
}

Topics

Creating a joint

Inspecting a joint

Instance Properties

See Also

Defining the joint hierarchy