playMaker

Author Topic: Animating causes object to reset position [SOLVED]  (Read 1515 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Animating causes object to reset position [SOLVED]
« on: April 23, 2014, 01:06:49 AM »
I have a character with lots of animations, they all work great thankfully.

I duplicated this character mesh, renamed it, stripped it of all its FSM components, and changed his texture to create an "enemy". This new enemy has some basic AI stuff on him, all working great.

I just tried to add some animations using the "animation settings" and "play animation" actions based on what's happening in the AI. Since his mesh is a duplicate of the player character, the animations were already there in the dropdown menu, convenient! Nope.

Whenever the enemy attempts to animate, he instantly moves to the default location, which also happens to be the starting location of my player character. The animations in question don't have any translation, only rotation. The animations don't reset the player character when they're used with him, so it can't be the animation itself.

Could it be because I duplicated the character mesh? Do I need to export all the animations again with a different file name for the enemy? I wouldn't think so, I have other animated objects which I've created by duplicating meshes without issue.

Any ideas? Thankful for any input!
« Last Edit: April 23, 2014, 06:36:48 PM by Breadman »

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Animating causes object to reset position to 0,0,0
« Reply #1 on: April 23, 2014, 06:36:34 PM »
Turns out I had to put the animated object (the enemy mesh) inside of another game object. The new parent gameobject is what had to be moved around using the "move towards" action. Using "move towards" on a mesh that's also animating apparently causes issues.