alright so, m working on a parkour game and this seems to have come up … the parkour script works and lets my character jump over, but does not let it go back to its previous state,
the boolean “canleap” turns true, but never turns false… i just cant figure out the problem
( m new to the forums and unity, so forgive me if m doing something wrong)
heres the script -
internal var animator: Animator;
var legs : GameObject;
var range : float;
function Start () {
animator = GetComponent("Animator");
}
function FixedUpdate() {
jumpover();
}
function jumpover (){
var hit : RaycastHit;
var direction = legs.transform.forward ;
if(Physics.Raycast(transform.position,direction,hit,range)) {
if(hit.collider.gameObject.tag == "box") {
Debug.Log("it hits ");
//if(Input.GetKey(KeyCode.E)) {
animator.SetBool("canleap",true);
}
else animator.SetBool("canleap",false);
}
}