Quantcast
Channel: Answers by "brunopava"
Viewing all articles
Browse latest Browse all 64

Answer by brunopava

$
0
0
You can use this method: http://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html To create a simple timer you can use: float time = 0; private void Update() { time += Time.deltaTime; Debug.Log(time); } ps: For the trigger to work properly you need to attach both collider and rigidbody to the object that is entering the trigger. As for the trigger itself you just need a collider with trigger enabled.

Viewing all articles
Browse latest Browse all 64

Trending Articles



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