MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ApplyRootMotion

Method ApplyRootMotion

Source/Engine/Level/Actors/AnimatedModel.cpp:675–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675void 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
689void AnimatedModel::SyncParameters()
690{

Callers

nothing calls this directly

Calls 7

GetScaleFunction · 0.85
GetOrientationFunction · 0.85
IsIdentityMethod · 0.80
TransformClass · 0.50
IsZeroMethod · 0.45
GetMethod · 0.45
AddMovementMethod · 0.45

Tested by

no test coverage detected