FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.


descriptionI can't make it work

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?

descriptionRe: I can't make it work


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 =)

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