- Home /
Question by
DwarfinChief · Mar 27, 2015 at 04:51 PM ·
animations
Can I pass an animation from one game object to another?
I'm curious if I can do the following: 1) Plop an NPC into a scene 2) Plop some other static game object into the scene (let's call it treasure chest) 3) When the NPC collides with the treasure chest the chest 'hands' the NPC an animation to play.
I realize usually all animations are inside of the NPC's normal animation controller but I'd like to be able to provide object expansion packs that don't require modifying the NPC itself.
Is it as simple as changing the NPC's animation controller on demand?
I was hoping for something more simple along the lines of collider.gameObject.animation.Play('some clip in the treasure chest');
Comment