| 673 | } |
| 674 | |
| 675 | void AnimatedModel::ApplyRootMotion(const Transform& rootMotionDelta) |
| 676 | { |
| 677 | // Skip if no motion |
| 678 | if (rootMotionDelta.Translation.IsZero() && rootMotionDelta.Orientation.IsIdentity()) |
| 679 | return; |
| 680 | |
| 681 | // Transform translation from actor space into world space |
| 682 | const Vector3 translation = Vector3::Transform(rootMotionDelta.Translation * GetScale(), GetOrientation()); |
| 683 | |
| 684 | // Apply movement |
| 685 | Actor* target = RootMotionTarget ? RootMotionTarget.Get() : this; |
| 686 | target->AddMovement(translation, rootMotionDelta.Orientation); |
| 687 | } |
| 688 | |
| 689 | void AnimatedModel::SyncParameters() |
| 690 | { |
nothing calls this directly
no test coverage detected