- Home /
creating animation made my each prefab spawn at same position
I create and empty object and make it move on z-axis and each 1 step on the axis create a cube but when i create an animation of cube, each cube being created at same position. how can i fix this? (also sorry for my bad english .d )
Answer by cam74 · Jul 08, 2020 at 08:54 PM
The animation of position of the cube is relative to its parent which seems to be the scene in your case. Your prefab should be an empty gameobject with the cube sets as a child of it: the animation will then be relative to the empty (which you could move anywhere in the scene independently from the animation). This is something you can't avoid in Unity when working with animations.
Your answer
Follow this Question
Related Questions
creating animation made my each prefab spawn at same position 1 Answer
spawning a prefab that have animation 1 Answer
Distribute terrain in zones 3 Answers
Animator is not playing a Playable 2 Answers
Run animation when countdown reaches 0 2 Answers