Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created and animated a sledgehammer in Blender 2.67b using an armature. The sledgehammer has one animation (created using the Action Editor) called "Idle". I parented the imported sledgehammer to an empty GameObject and set the sledgehammer's position to (0, 0, 0). I then moved the parent GameObject to where I want it in the scene. When I launch the game, the animation plays but the sledgehammer child always re-positions itself to be at the global origin, no matter where I place the parent GameObject. See the image below:

animated gameobject mispositioned

Notice how the sledgehammer's position goes from (0, 0, 0) to (-1087, -3, -1149).

The armature has a single bone and has the sledgehammer object as a child. I've spent about 4 hours looking this up on the Internet, but it seems like parenting the animated mesh to an empty GameObject worked for everyone else except me. Anyone else experience this? I've tried both .fbx and .blend files.

share|improve this question
In Blender, try hitting Ctrl+A with your object selected, then choose Location. Does that help? – Byte56 Aug 12 '13 at 3:11
I tried applying the Location/Rotation/Scale early on, didn't fix it. Good suggestion though! I have a tendency to neglect things like that – Ryan Berserkguard Nørby Aug 12 '13 at 3:17

You can solve this programatically for now. A small script will update the position before the draw call to keep the sledgehammer in the position of your Parented game object. Drag the GameObject parent onto the inspector after applying this script:


#pragma strict

var localOrigin : GameObject;

function Start () {
    transform.position = localOrigin.transform.position;

function LateUpdate () {
    transform.position = localOrigin.transform.position;


public GameObject localOrigin;

void Start () {
    transform.position = localOrigin.transform.position;

void LateUpdate () {
    transform.position = localOrigin.transform.position;

Hope it helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.