playMaker

Author Topic: Animation moving character away from controller.  (Read 3076 times)

redsett

  • Playmaker Newbie
  • *
  • Posts: 6
Animation moving character away from controller.
« on: January 10, 2014, 03:57:36 PM »
This isn't a Playmaker question but I like the community so I'll ask here anyway. :)

    I'm having an issue where the animation is moving the character away from the character controller. In Maya and the Unity animation preview there is no movement away from the world center(just running in place). But in game it will ever so slightly move it away. If I turn off the animations it does fine, so it has to be the animations.

Any ideas or suggestions would be great. Thanks!

EDIT: In case this has anything to with it, I'm using Mecanim.
« Last Edit: January 10, 2014, 03:59:24 PM by redsett »

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Animation moving character away from controller.
« Reply #1 on: January 10, 2014, 04:29:15 PM »
Is it possible that the character is moving slightly in Maya? Maybe it's so small that you don't notice it until the animation is looping/repeating (like in a run cycle) within Unity. I know I've accidentally done this quite a bit haha.

redsett

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Animation moving character away from controller.
« Reply #2 on: January 10, 2014, 04:52:10 PM »
The start and end frames are exactly the same. I'm thinking it's when it blends to a new animation, it will blend from where it is at that time and add with the new animation its blending to. I didn't notice this problem before switching to Mecanim.

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Animation moving character away from controller.
« Reply #3 on: January 10, 2014, 11:18:01 PM »
Hmm. I haven't tried mecanim yet, but it sounds like you've definitely narrowed it down to mecanim being part of the problem. I hope someone with a little more knowledge about that can hop in and help out!

The only other thing I can suggest is, in Unity, select the animation that's causing problems, and then in the inspector, under the mini "rig" tab, choose animation type as "legacy". This fixes a lot of random animation issues for me, might be worth a shot.

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: Animation moving character away from controller.
« Reply #4 on: January 12, 2014, 04:29:37 PM »
It sounds like you're having a transform issue which are sometimes difficult to troubleshoot.

Think of the volume on your computer. If you're watching videos, you might first try to turn up the sound in the application. If that doesn't work, you might have to turn up the sound in the volume mixer. If that doesn't work, you may have to hunt for a physical knob on the speakers themselves.

Similarly, the transform value will be determined by a number of different systems. First by your animation program. Then by Unity (root transform position/rotation in the inspector), possibly by mecanim, and further complicated by any masks or custom code applied to the character. And ultimately, the transform will be controlled by the player.

Usually it's just a matter of going down that list.