Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » I can't make it work

I can't make it work

View previous topic View next topic Go down  Message [Page 1 of 1]

1 I can't make it work on Tue Apr 21, 2015 2:16 pm


Member [Lv. 0]
Member [Lv. 0]
Hi, I have problems with the animation.
Everything is working fine but when I
set the animation on "loop" when I press
"w" the animation starts but doesnt stop.
Any advise?

View user profile

2 Re: I can't make it work on Thu Sep 24, 2015 7:04 pm


Member [Lv. 3]
Member [Lv. 3]

ok check the image provided, it is for the animator system, you are able to hook up your input axis with the animator to control the animations, as you can see i have Horizontal and Vertical assigned as 2 floats in my example. you are able to drive these with your player script like so

//take note in the animator i named them Horizontal & Vertical


Animator anim;
private bool jump = false;

void Start()
anim = GetComponenet<Animator>();

void Update()
anim.SetFloat("Horizontal", InputgetAxis("Horizontal"));
anim.setFloat("Vertical",  InputgetAxis("Horizontal"));
//this is how we are going to drive our animations
//for jump we can do the same thing with the boolean variable

jump = true;
anim.setBool("Jump", jump);
jump = false;

now we have working movement and jump animations. if you need further assistance i am happy to explain more over skype if need be =)

View user profile http://jakeaquilina.weebly.com/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum