well i made a similar question but not the same i have a script
#pragma strict
var up = false;
function Update() {
var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit, 2))
{
Debug.DrawLine (ray.origin, hit.point, Color.red);
if(hit.transform.gameObject.CompareTag ("Labyrinth") && up == false)
{
animation.Play("UpArmLeft");
{
up = true;
}
}
if(!hit.transform.gameObject.CompareTag("Labyrinth") && up == true)
{
animation.Play("DownArmLeft");
{
up = false;
}
}
}
Th animation UpArmLeft works perfectly but the other doesnt work so great because i have to play it when the player isn`t at the wall anymore or if he isnt looking at the wall then he should play the animation too but it doesnt work really good because sometimes it works but with delay and other times it doesnt work at all
any advice on how to make the animation play when the player is off the wall or isnt looking at it would be very appreciated
thanks in advance skullbeats1