Animator Editor
Use an Animator to choose which imported 3D animation clip plays. This example changes from Idle to Walk while you hold W and returns to Idle when you release it. It changes animation; add movement Logic separately when the character should travel.
Prerequisites
Use a 3D project, show Advanced resources, and import a Model with named clips. Open an Animator and choose a compatible preview Model. Inspect the Model’s clip selector first; a state cannot play a clip that the Model doesn’t contain.
Create States and Transitions
- Add an Animator named
Walk Checkand choose your Model in Preview Model. Select + State, name the stateIdle, choose the Idle clip, and keep Loop on. - Choose Make Start State for Idle. Add a second state named
Walk, choose its Walk clip, and keep Loop on. Substitute the actual imported clip names when they differ. - In Parameters, select + Parameter. Name it
walkAmount, choose Number, and set its default to0. - Select Idle, choose New Transition from Here, then click Walk. Select the resulting transition. Set Blend Seconds to
0.15and turn Has Exit Time off. - Select Add Condition. Choose Parameter
walkAmount, Operator>, and Value0.1. - Create the return transition from Walk to Idle. Use Blend Seconds
0.15, Has Exit Time off, and the conditionwalkAmount <= 0.1. - Change walkAmount to
1in the preview parameter controls, then return it to0. Save and reopen the Animator.
Expected result: the default selects Idle, 1 selects Walk, and returning to 0 selects Idle. Use a custom parameter name for this check. Parameters named speed, moving, grounded, vspeed, dirX, and dirY are fed by the engine when declared. Their live values follow gameplay and can replace a value set by hand.
Transition conditions depend on parameter type. Boolean conditions choose Is True or Is False. Numeric conditions have an operator and a value. Use a Trigger parameter to request a transition. Use a Boolean parameter for a state that stays true or false. Transition priority matters when several outgoing transitions qualify.
Assign and Control Playback
Choose Walk Check in the Model Editor’s Animator field. Place one Object using that Model in the startup Scene and confirm that the game Camera can see it.
In Game Settings > Input Manager, add a Button Command named Walk in the active input context and record W as its keybinding. Create a button Command covers the recorder and context setup.
Create a Logic Component named Walk Animation, set its dimension to 3D in Details, and attach it once to the character Object. Add these Events and connect each one through its Action to End:
| Event and filter | Action | Field values |
|---|---|---|
| Command Pressed, Walk | Set Animator Parameter | Applies To: SELF; Parameter: walkAmount; Value: 1 |
| Command Released, Walk | Set Animator Parameter | Applies To: SELF; Parameter: walkAmount; Value: 0 |
Find Set Animator Parameter under 3D World > 3D Animation. Its Parameter field names the Animator declaration, not a Logic Parameter. See its field reference.
Start Debug Play and focus the game. Hold W, release it, and repeat. The Model should blend into Walk while W is held and return to Idle after release. Stop and start again to check the authored default. Each live character instance has its own Animator state and parameter values.
Use Fire Animator Trigger for a Trigger parameter, with its exact name in Trigger. Play Animator State changes state directly and skips transition conditions. Set Model Animation plays a clip override while the Animator continues underneath; clear that override before diagnosing a state change hidden by another clip.
Preview This State plays one state’s clip. To check the transitions, change the parameter from its default, cross the threshold, and return to the initial value.
Expected result: the default parameter selects Idle, movement selects Walk, and returning to rest selects Idle again. Observe the transition as well as each isolated clip. If the source has root motion, check whether that motion is intended alongside your movement Logic.
Troubleshooting
If a state has no animation, compare its clip name with the Model’s imported clips. If the graph starts in the wrong state, inspect Make Start State. If a transition never fires, check parameter value and type, every Condition, and Has Exit Time.
If transitions alternate continuously, review both conditions and priorities; use different thresholds if the input oscillates at the boundary. If the wrong clip appears after reimport, inspect changed clip names and reassign them.
If Set Animator Parameter is missing, set the Logic dimension to 3D. If preview works but W has no effect in play, check the Model’s Animator assignment, exact parameter name, enabled attachment, Command mapping, and active input context. A manually assigned value that changes back can be an engine-fed parameter.
Use IK Setups for constraints applied to an animated skeleton. Use Skeletal Rigs for Sprite-part animation in 2D.
Myth Engine Documentation
