- Home /
Blender mesh reverts to original position when starting game
My friend has created a mesh that I've placed as a child to another mesh in my game. However, when I start the game, the mesh reverts to the original position it was in when I imported the mesh.
I also happen to notice that the position coordinates are bold. Could someone please help?
Thanks!
Does the object have an animation on it? Sometimes, the animation will force an object's position to reset on the first frame.
Nope. It's just a static cannon. I've attempted to position the cannon as a child beside a parent mesh. I'm able to move it into place in the editor, but when I start the game, it returns to the initial x,y,z positions.
All objects from blender by default are imported with empty animation. $$anonymous$$ake sure that you set "Animations - Generation" to "don't import".
Answer by Mahamed9628 · Feb 11, 2012 at 03:16 PM
In that case I usually set object's parenting to other object. For example your imported object has coordinates 0,0,0. It will keep 0,0,0 anyway. But if you set its parent to other (empty) object, it will keep 0,0,0 in local space. And then just move parent object.
I said it cause parent of your object is $$anonymous$$ESH. $$anonymous$$ain idea is to try something not imported, something like empty object.
Answer by n8 · Feb 17, 2012 at 08:27 PM
I am having this same issue. The gentleman from this post seems to have pinpointed the problem in that Unity 3.5 and blender 2.61 (and apparently 2.62) have issues importing. I have found that if instantiate a default cube (from within Unity) you can then go in and swap out the mesh in the mesh renderer to the one you imported. That "seems" to work most of the time as a work around.
Answer by Peyotle · Feb 20, 2012 at 08:48 AM
I'm have a same problem with 3.5. Exporting models from older versions of blender (2.58a, 2.59) don't make difference.
update: Sorry. Problem was in imported empty animation.
Answer by jceipek-2 · Mar 14, 2012 at 06:24 AM
In cases where the object has an armature and animations associated with it, I haven't had any problems at all.
It seems to only happen for me when I make a static object in Blender and import it into Unity. In that case, unchecking the animation box works well (see this post). As far as I can tell, there is no need to use the mesh swapping trick suggested by n8.
Your answer
Follow this Question
Related Questions
Instantiate an imported blender mesh 2 Answers
Problems importing curves from blender into Unity 3d 2 Answers
Apply materials to imported meshes 0 Answers
How do i avoid shared vertices? 3 Answers
Blender to unity issue 1 Answer