Description
The GetBoneWorldTransform
method retrieves the world-space transform of a specified bone in a SceneModel
. This method is useful for obtaining the position, rotation, and scale of a bone relative to the world, which can be used for various purposes such as attaching objects to bones or calculating bone-based effects.
Usage
To use the GetBoneWorldTransform
method, you need to have an instance of SceneModel
. Call the method with the index of the bone you are interested in. The method returns a Transform
object representing the bone's world-space transform.
Example
// Assume 'sceneModel' is an instance of SceneModel
int boneIndex = 5; // Example bone index
Transform boneTransform = sceneModel.GetBoneWorldTransform(boneIndex);
// Use the transform for further operations
Vector3 bonePosition = boneTransform.Position;
Rotation boneRotation = boneTransform.Rotation;