Summary
A component which takes the root motion from an
UnityEngine.Animator
and applies it to a
different object.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- MonoBehaviour
- Derived Types
graph BT
Type-->Base0["MonoBehaviour"]
Type["RedirectRootMotion"]
class Type type-node
Derived0["RedirectRootMotion<T>"]-->Type
click Derived0 "/animancer-v7-4/api/Animancer/RedirectRootMotion_1"
Syntax
[HelpURL("https://kybernetik.com.au/animancer/api/Animancer/" + nameof(RedirectRootMotion))]
[RequireComponent(typeof(Animator))]
public abstract class RedirectRootMotion : MonoBehaviour
Remarks
This can be useful if the character's
UnityEngine.Rigidbody
or UnityEngine.CharacterController
is on a
parent of the UnityEngine.Animator
to keep the model separate from the logical components.
Attributes
Type | Description |
---|---|
HelpURLAttribute | |
RequireComponent |
Properties
Name | Value | Summary |
---|---|---|
Animator | Animator |
The
UnityEngine.Animator which provides the root motion. |
ApplyRootMotion | bool |
Is
UnityEngine.Animator.applyRootMotion enabled? |
Position | Vector3 |
The current position of the target.
|
Rotation | Quaternion |
The current rotation of the target.
|
Methods
Name | Value | Summary |
---|---|---|
OnAnimatorMove |
void |
Applies the root motion from the
Animancer.RedirectRootMotion.Animator to the Target . |
OnValidate |
void |
Automatically finds the
Animancer.RedirectRootMotion.Animator . |