- Home /
Question by
CallToAdventure · Mar 11, 2011 at 08:43 PM ·
animationchildplay
Play animation in child model
Hi everyone
I am using this trying to play an animation on a model parented to the object the script is attached to:
if (Input.GetKey("l")) { var child = transform.Find("gear"); if (animation.Play == ("rotate")) child.animation.Play("rotate");
}
And it's actually 2 levels deep in the hierarchy :
ModelWithScript ----> -----ChildModel -----ChildModelAnimated
Any idea/help is greatly appreciated, thanks!
Comment