- Home /
Animating an object so it doesn't bounce to the initial location the animation was recorded
All I want is a cube to pivot 90 degrees on 1 side to form a "trap door" like behavior. I made a script to randomly play the animation I recorded, but all the other cubes stack on the location the recording was made. The recording was made inside Unity, I don't have software to export to unity.
What's the easiest way to make a pivoting trap door that won't default to the location it was created? I tried putting it in a gameobject and controlling the gameobject to no avail. I tried deleting parts of the animation and it screws the entire thing up (looks halfway open by default)
Answer by captaincrunch80 · Apr 12, 2012 at 01:08 AM
Give it an (Empty) Game object as parent, make position it at 0,0,0 and animate then in relative Space!
Save the parent with the trap door as prefab and you will have no problems with positioning the trap doors and animating at the correct place. Maybe you need a script or collider on the parent to control the trap door. But that is the way to do it.
Your answer
Follow this Question
Related Questions
Material not loading 0 Answers
Character Animation Wont Play 2 Answers
A node in a childnode? 1 Answer
Unity shadows work in scene, but no through camera 0 Answers
troble with the Axis in unity 1 Answer