- Home /
Animation affects only collider, not the object
I upgraded to Unity 5 and suddenly a triggered animation that used to work doesn't work any more. I have a trigger and a door. Door is a block with cube collider. There is an animation called "DoorDown" attached to door object, and once a trigger is triggered, it sends
door.GetComponent.<Animation>().Play("DoorDown");
and door should lower into the floor. What's weird is that when I play everything from Animation window, it works. When it's triggered by a script during gameplay, only the collider lowers down, and mash remains. A player can pass through the solid door, so it works for gameplay, but visualy it's ridiculous. Any ideas what this could be?
Am I missing something?
Answer by Relja-Trajkovic · Mar 27, 2015 at 08:35 PM
Found the solution. It appears that static objects can no longer be moved via script or animation. That's new with Unity 5. This block was marked as static since I needed it for level baking.
Your answer
Follow this Question
Related Questions
OnTriggerStay2D Breaks When Adding AnimationController 1 Answer
Collide with object trigger - why animation only occurs on first encounter with trigger 1 Answer
play a door animation with collider 1 Answer
Trouble getting a trigger to activate an animation 2 Answers
On/Off Animator using script 2 Answers