- Home /
Objects move on play
I'm making a sort of strategy game, and so far I have one map and five village objects which are loaded from a prefab but have different scales and names. The problem is that when I hit play, they all move to 0,0,0 translate and 1,1,1 scale. I've noticed that in the inspector, the translate and scale are both bold, what does it mean and how do I fix it.
I thought people solved most of these problems by changing the position and scale by script?
Answer by tsoramaki · Jun 27, 2012 at 11:04 PM
Do your meshes have animations? I noticed when I import a mesh with no animations from blender, and I leave the animation import settings alone, my game objects pop to 0,0.
To fix this I just went into the import settings, and set it so Unity does not import animations. That fixes my problem.
Answer by UCRussian · Oct 28, 2012 at 04:01 AM
I have same problem, I created AK47 in Cinema 4d with some keyframes 1-100 idle and 101-150 fire, when I add the toy into Unity it's moving to 0.0.0 once I hit play (Command+P) and I've notice that it happends only when my automation set to LOOP. If you have a solution please write it down please. Thanks
Answer by lisa_vasilisa · Jul 28, 2017 at 10:59 PM
@UCRussian this might be late but:
I had the same issue and it turned out the animator component was attached to an entire group I imported (a group of 3 meshes, 1 of which was the mesh that was animated). This group was nested inside a parent folder. After importing into Unity, I had moved all but one of the meshes around. When I pressed play, all the meshes moved to the transform position of the one mesh I didn't move. The problem is indeed solved by turning loop off. But, since I wanted my animation to loop, I solved it by readding all the objects to the scene, and making sure that when I moved them, I moved the entire group, and not any individual meshes.
Your answer
Follow this Question
Related Questions
Unity 2D Random Movement 1 Answer
mesh colliders moving when i press play 1 Answer
Third person controller & animation.. NEED HELP 0 Answers
Moving rigidbodies at random 1 Answer
movement doesnt stop when jump pad is tapped at the same time 0 Answers