- Home /
How to animate shaders/pfx etc on 3D characters? Can't add keyframes to imported (Read-only) animations.
Hello, thanks for your time :)
I have a 3D animated character driven by a state machine, BUT within the same gameobject hierarchy, driven by the same state machine, I'd like to animate unity properties (eg: particles, shaders / squash & stretch etc)
The 3D anims are imported (read-only), so I can't add those properties, BUT I have achieved a solution using 2 identical animator controllers in the same hierarchy (see attached image)
The 3D model is a Child, and uses an Override Controller based on the Parent's Animator Controller.
This works, but feels like a dodgy inflexible hack which will end in tears further down the line...
Do you know of a better one?
Answer by dualpulse · Jul 29, 2015 at 03:10 AM
SOLVED: Research and experimentation has revealed that hierarchy is the fundamental factor, and I was doing it wrong.
With the correct hierarchy, ANIMATION LAYERS make it possible to animate shaders & pfx on a 3D character, within a single animator controller.
The imported 3D model MUST be the parent object (top tier), and any other objects (eg: particle emitters) inserted as children.
Add animation layers, with new Unity-editor created animations to these layers. They can play in parallel to your 3D anims and aren't limited by the "read-only" flag. :)
Your answer
Follow this Question
Related Questions
Sharing some but not all animator states between characters 0 Answers
Using Override Animation Controllers (NOT WORKING) 0 Answers
Multiple Chracter(from same prefab) with same Animator does not work 0 Answers
How do I check, and change, the current frame/time of a sprite animation in Unity 4.3? 0 Answers