- Home /
Question by
Robomaster · May 02, 2012 at 09:27 PM ·
movementcharacterplatformer
Platformer character movement
Hello what im trying to do is create a mario style platformer but im alittle stuck on the movement of the character. How would i alter this script so that the character can only walk left and right with the walk animation
function Update ()
{
if (Input.GetAxis("Vertical") > 0.2)
animation.CrossFade ("walk");
else
animation.CrossFade ("idle");
}
Comment