• Unity
  • My character seems to rotate/fall while walkin

Hello again. I'm having an issue on my Skeleton Animation on Unity. When the character is walking he seems to fall in front of him little by little.

I somehow fixed this by replacing in my script:
//rigidbody.velocity = new Vector2(movement * speed, rigidbody.velocity.y);
rigidbody.transform.Translate(Input.GetAxis("Horizontal")/10,0,0);

Now the character straights up at each end of animation (which seems laggy).

I checked that the foot doesn't go through the floor and it doesn't improve the situation. Do I have to change the center of the mass of my character maybe? Or may the character bends when one of his feet does not touch the ground, and I have to work on may animation better.

Related Discussions
...

This is more a problem with your player's Unity physics setup (most likely with CharacterController or Rigidbody), animation is not the cause. Most of the time, you will want to lock any rotation at characters.

You might want to have a look at the example scenes included in the spine-unity package, they can be found under Spine Examples. There you will find e.g. a complete platformer example scene: SpineExamples/Getting Started/5 Basic Platformer.

Alternatively, you could declare this problem as a feature and create a toddler simulator, I could imagine some funny games around that 😉

Ok, now I know where the problem is from 🙂
I will try that thanks!

Yes, I think I will keep a backup of the current project, who knows 😃


I see in the examples that there is no RigidBody nor BoxCollider. I suppose I have take an example on Unity that wasn't right to use for my character. I will follow Spine Examples directly from now on 🙂

Please note that in the plaformer scene the CharacterController component at the GameObject named Player is providing a CapsuleCollider, which is a typical way of how to implement character movement in Unity. The shape of the CapsuleCollider is most often more suitable for humanoids than the square shape of a BoxCollider.

Haa, I didn't see that, thanks for the info. I will try that