playMaker

Author Topic: Animator + Spinning out of control!  (Read 1527 times)

necrio2

  • Playmaker Newbie
  • *
  • Posts: 15
Animator + Spinning out of control!
« on: May 18, 2018, 07:00:43 PM »
Trying to get animator animations working with movement. But, rotating seems to pull(push?) the player further and further away from the center. Eventually, it would be spinning way off screen.


I recorded a GIF of it. In the GIF, it isn't as extreme. But shows it a little bit.https://imgur.com/a/fgPX5sa

Below is a picture of the states I am using.

The issue seems to stem from Get axis / Set animator float.

How would I get animator to work properly while moving, without spinning further and further away from the center?

Kathar

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Animator + Spinning out of control!
« Reply #1 on: May 19, 2018, 05:57:24 PM »
Just a thought, but could it be that you have Apply Root Motion enabled on your Animator component? That could potentially cause an issue like this if not used in an appropriate setup

Wolfride

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Animator + Spinning out of control!
« Reply #2 on: May 20, 2018, 07:07:05 PM »
The offset you're seeing from the center of the object indicates incorrect model/set up settings more than a playmaker issue. Try using a premade third person controller or doing a simple forward/turn and see if you have problems before getting more advanced.

In your project files, click on the model. Go to the 'rig' tab in the inspector. Double check the animation type is correct. Possibly regenerate the avatar in this panel via avatar definition, and if you're using root motion look into the root node option.

Try toggling rootmotion off.

Also the scale factor in the Model panel can cause models to misbehave depending on how they were exported. For example in Makehuman, if you change export to meters and scale the model at all, you'll get the same thing that is happening to your robot. In makehuman the export must be set to decimeters and imported to unity with no scaling for a correct result.

So if you scaled your model in Unity, that can cause this if the bones aren't scaling well. Edit: Or the program is exporting an incorrect scale. But fixing it in the program is better than trying to do it Unity, due to the bones.
« Last Edit: May 20, 2018, 07:09:12 PM by Wolfride »