I have a problem, i really need some help here. I loaded the spineboy example scene where you can walk around with spineboy using his spineboycontroller.cs... It works perfectly, and i started the project, made my character and everything, imported it to unity, and started making a script using help from this forum... I made the character jump and walk around, but here's the problem, when i hold a "D" key, he walks right normally how he's sopposed to, and when i release it, it needs to stop and make the idle animation play instead of walking one, but he's not doing that, he is just freezing the last frame of the walking animation except playing the idle one... The jumping works complitly normal though. Then i tryed using the spineboy controller's code on my character instead, but it does the same thing.... What is the problem, i think my code is not even important here becouse it's not a problem in it, becouse it acts the same as the spineboys and does the same thing. Sorry for spelling mistakes, i'm typing fast i'm nervos:
if (Input.GetKeyUp (KeyCode.Space))
{
if(CanJump == true)
{
skeletonAnimation.state.SetAnimation (0, "Jump", false);
skeletonAnimation.state.AddAnimation (0, "Idle", true, 0);
rigidbody2D.AddForce (Vector2.up * JumpH);
}
}
if (Input.GetKeyDown (KeyCode.D))
{
if (skeletonAnimation.AnimationName == "Idle")
{
skeletonAnimation.state.SetAnimation (0, "Walking", true);
}
}
if (Input.GetKeyUp (KeyCode.D))
{
if (skeletonAnimation.AnimationName == "Walking")
{
skeletonAnimation.state.SetAnimation (0, "Idle", true);
}
}
if (Input.GetKey (KeyCode.D))
{
if (skeletonAnimation.AnimationName == "Walking")
{
transform.Translate (Vector2.right * WalkingSpeed * Time.deltaTime);
transform.eulerAngles = new Vector2(0,0);
}
}
if (Input.GetKeyDown (KeyCode.A))
{
if (skeletonAnimation.AnimationName == "Idle")
{
skeletonAnimation.state.SetAnimation (0, "Walking", true);
}
}
if (Input.GetKeyUp (KeyCode.A))
{
if (skeletonAnimation.AnimationName == "Walking")
{
skeletonAnimation.state.SetAnimation (0, "Idle", true);
}
}
if (Input.GetKey (KeyCode.A))
{
if (skeletonAnimation.AnimationName == "Walking")
{
transform.Translate (Vector2.right * WalkingSpeed * Time.deltaTime);
transform.eulerAngles = new Vector2(0,180);
}
}
Well even when i play the animation in my character data, there's a player there, i play one animation, and then i press another one, and they mess up becouse they play over eachothers... I have to press setup pose every time.... I think it was a total mistake to use this program, it's great fo animating and everything, but seriously if i need to wait for 5 days for an answer, it's not worth it in my opinion, i don't have time to waste.