public struct BoneTransformWhere one joint is, relative to its parent: translation, rotation and scale, and never a matrix.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Animation is interpolation, and a matrix is the one representation that cannot be interpolated. Blending two matrices component by component gives a transform that is neither of them and is not rigid — the classic collapsing-elbow artefact — while blending a translation, a quaternion and a scale independently gives exactly the pose halfway between the two. Every clip, every blend tree and every layer in this assembly works on these; the matrix is produced once, at the end, by ComputeSkinningMatrices.
Non-uniform scale is carried because exporters emit it and dropping it silently would make a scaled prop detach from the hand holding it. It is not composed correctly through a rotated parent — nothing that decomposes to TRS can be, since the product of a rotation and a non-uniform scale is a shear — so a rig that scales non-uniformly under a rotation gets the same answer every other engine gives, which is the approximation and not the shear.
The fields are public and mutable on purpose; see the note in .editorconfig. A pose is a span this module writes in place.
Fields and properties (4)
public Vector3 TranslationOffset from the parent joint.
public Quaternion RotationRotation relative to the parent joint.
public Vector3 ScaleScale relative to the parent joint.
public static BoneTransform IdentityThe transform that changes nothing.
Methods (8)
public BoneTransform(Vector3 translation, Quaternion rotation, Vector3 scale)Creates a transform.
public readonly Matrix4x4 ToMatrix()This transform as a matrix.
public static BoneTransform FromMatrix(in Matrix4x4 matrix)Splits an affine matrix back into a bone transform.
public static BoneTransform Concatenate(in BoneTransform local, in BoneTransform parent)Composes two transforms: applied first, then .
public static BoneTransform Inverse(in BoneTransform value)The transform that undoes this one.
public static BoneTransform Lerp(in BoneTransform from, in BoneTransform to, float amount)Interpolates between two transforms: the blend every other operation here is built out of.
public static BoneTransform Difference(in BoneTransform pose, in BoneTransform reference)What does that does not — the difference an additive layer applies.
public static BoneTransform Add(in BoneTransform value, in BoneTransform additive, float weight)Applies an additive difference on top of a base transform.
Used by (118, showing 40)
- CharacterAnimationThirdPersonShooter
- SamplingBenchmarksVixen.Benchmarks.Animation
- AccumulatorVixen.Animation
- AnimationClipVixen.Animation
- AnimationClipContentVixen.Animation
- AnimationClipTestsVixen.Animation.Tests
- AnimationLayerVixen.Animation
- AnimationSystemVixen.Animation
- AnimatorVixen.Animation
- AnimatorTestsVixen.Animation.Tests
- AttachmentFrameVixen.Animation
- AttachmentSocketVixen.Animation
- AuthoringTestsVixen.Animation.Tests
- BlendEvaluatorVixen.Animation
- BlendTree1DVixen.Animation
- BlendTree2DVixen.Animation
- BlendTreeTestsVixen.Animation.Tests
- BodyVariationVixen.Animation
- BoneTransformTestsVixen.Animation.Tests
- CameraConstraintsVixen.Animation
- CameraSubjectVixen.Animation
- CameraViewVixen.Animation
- ClipMotionVixen.Animation
- CompressionTestsVixen.Animation.Tests
- ComputedTestBindingVixen.Animation.Tests
- ConstraintBindingsVixen.Animation
- ConstraintContextVixen.Animation
- ConstraintFrameRecordVixen.Animation
- ConstraintGizmoSystemVixen.Animation
- ConstraintGizmosVixen.Animation
- ConstraintProposalsVixen.Animation
- ConstraintSolveContextVixen.Animation
- ConstraintStackVixen.Animation
- ConstraintTestsVixen.Animation.Tests
- DefaultChainSolverVixen.Animation
- DefaultConstraintArbiterVixen.Animation
- EcsIntegrationTestsVixen.Animation.Tests
- EntityFrameVixen.Animation
- FootPlacementVixen.Animation
- FootPlacementPresetVixen.Animation