How would i make it so that when i hit a collider, and when im in that certain collider i press the button ‘h’ The animation starts to go, I did try and write this code myself but it didnt work, This is my code
function OnCollitionEnter ()
{
if(Input.GetKey("h"))
animation.Play("Test Animation");
}
If anybody could help or point in the right direction that would be great ?
Thanks