Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Play Animation on trigger enter

$
0
0
Hello, i want to play an animation (elevator) when a specific object enters the trigger, but the animation plays when i press the play button. function OnTriggerEnter (other : Collider) { if(other.tag == "target") { Animation.PlayMode("lift") } } If I have Animation.Play it gives me an error:"An instance of type UnityEngine.Animation is required to acces non-static member Play" Any ideas?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>