Khairul Iz'aan Zin’s Post

View profile for Khairul Iz'aan Zin, graphic

Game Development Programmer

Here's the initial result of my experimentation with Unity's Playables API for the past few weeks (Unity 6): The character animations are controlled by an AnimationManager script that contains a Playable Graph. The graph itself has an output mixer that has 3 mixers as input: a locomotion, a single animation, and a masked animation mixer. Depending on the situation and commands, the script will readjust the weight of each mixer accordingly. The locomotion mixer will handle the character's locomotion animations (idle, walk, strafe, run, etc.). In order to replicate Unity's Animator Blend Tree behavior, all these animations are bundled in a list of clips that has a unique x,y (lateral and forward speeds) attached to it. The AnimationManager will then take the list and create submixers for each clip and attach them to the locomotion mixer as inputs. During runtime, the weight for each submixer is determined using the Inverse Distance Weighted Interpolation method (https://lnkd.in/g8hfW2uC) and uses the character's lateral and forward speeds as input. As for the single animation and masked animation mixers, they can be activated with a function that takes an animation clip and blend duration as parameters. When the function is called, the script will readjust the weight of the locomotion mixer to be zero and the single animation or masked animation mixer to be one (based on the blend duration). So far, the Playables API is pretty awesome as it totally avoids the potential nightmare of having a "spider web" of states in an Animator. Looking forward to further fine tune the current framework to be more versatile. P/S: The AI is using the newly released Unity Behavior package. Gonna do more experiments on that.

M NAZMI IZUDDIN M NASIR

SME, Computerized Maintenance Management System (CMMS), SAP Plant Maintenance, Asset Data Management

1mo

Love this

Like
Reply

To view or add a comment, sign in

Explore topics