Bone

Bone : Attachment

Overview

The Bone class represents an attachment point that defines a specific location and orientation within a 3D space. It is widely used in skeletal rigs, enabling hierarchical relationships and transformations. This class provides properties and methods for retrieving and manipulating the transform of the bone relative to its parent or in world space.

Description

The Bone class serves as a fundamental building block in the structure of skeletal rigs. It defines an attachment point that not only provides a position and orientation in 3D space but also establishes a relationship to other bones in the rig through a hierarchical structure. This is achieved by specifying a parent bone, allowing transformations applied to the parent to propagate to its children seamlessly.

The primary characteristics of a Bone include:

  1. Local Transform: Using the OffsetTransform property, the Bone enables configuration of its position, rotation, and scale relative to its parent bone. This allows for precise adjustments within the local coordinate system.

  2. World Transform: By combining the transforms of all parent bones hierarchically, the TransformedCFrame property calculates the cumulative transformation to produce the Bone's position and orientation in world coordinates. This makes it a crucial property for rendering and animation.

  3. Animation-Friendly: The Bone is commonly used in animations where its transform can be adjusted dynamically to create movement, such as in character joints or mechanical articulations.

  4. Flexibility: Due to its ability to manage hierarchical relationships and calculate transforms dynamically, the Bone class is versatile and can be utilized in various fields, including game development, virtual simulations, and robotics.

Whether you are animating a humanoid character, creating mechanical rigs, or simply defining points of attachment, the Bone class provides robust and flexible functionality to accommodate complex rigging and animation workflows in 3D space.

Properties

OffsetTransform

CFrame

The OffsetTransform property specifies the local transformation of the Bone relative to its parent. It defines the position, rotation, and scale within the local coordinate system, enabling precise adjustments. This property is essential for hierarchical rigging, as it allows the Bone to maintain its local relationship to its parent while supporting transformations in a modular and flexible manner. The OffsetTransform is commonly used for defining base poses and is a cornerstone for animations and dynamic transformations within 3D skeletal systems.

Code Samples

local Bone = script.Parent

print(Bone.OffsetTransform)

TransformedCFrame

CFrame

The TransformedCFrame property returns the cumulative transformation of the Bone in 3D space relative to its world space. By calculating the combined transforms of the OffsetTransform property and all its parent Bone objects, TransformedCFrame provides the Bone's final position, orientation, and scaling in the global or world coordinate system. This is critical for tasks like rendering, collision detection, or applying animations, as it gives the precise position to align 3D models and rigs within the environment. With TransformedCFrame, users can seamlessly integrate the hierarchical rig structure into world-based operations, making it an essential property for managing skeletal systems effectively in game engines or other 3D development environments.

Code Samples

local Bone = script.Parent

print(Bone.TransformedCFrame)

TransformedWorldCFrame

CFrame

The TransformedWorldCFrame property provides the Bone's transformation relative to the global/world coordinate system with additional enhancements specific to the world context. This property is an extension of the TransformedCFrame, allowing for further integration with global transformations or systems that require adjustments based on specific world settings, such as environmental scaling or world-based offsets.

By combining the Bone hierarchy's cumulative transformations with any necessary world-specific adjustments, TransformedWorldCFrame delivers the final position, orientation, and scaling required for seamlessly aligning bones and animations in the 3D environment. This property supports advanced use cases, such as blending animations with environmental effects or integrating motion capture data into the skeletal system.

This makes the TransformedWorldCFrame property highly versatile for game engines, visual effects, and simulations where world-aware skeletal systems are essential for realistic interactions and movements.

Code Samples

local Bone = script.Parent

print(Bone.TransformedWorldCFrame)

Methods

Events

Last updated