- Home /
Question by
rajhansuttamksirsagar · Sep 14, 2016 at 12:24 PM ·
animator controller
Problem with animator control
I have created an animation control for a simple character. first idle state and then jump.
following the script
using UnityEngine; using System.Collections;
public class AlexiaControls : MonoBehaviour {
static Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
if (Input.GetButtonDown("Jump"))
{
anim.SetTrigger("isJumping");
}
}
}
the problem is, when I run this , and press spcaebar for long jump, after jumping my character comes back to its original position instead of remaining to its new position after jumping
can anybody help ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612092719im_/https://answers.unity.com/themes/thub/images/avi.jpg)