Quantcast
Channel: Answers by "Aaron_T"
Viewing all articles
Browse latest Browse all 16

Answer by Aaron_T

$
0
0
OnTriggerEnter is called immediately when the object detects that it entered another trigger, putting it in FixedUpdate wouldn't put a delay, if it would even work at all. What you can do, if you need something to happen after a delay, is have OnTriggerEnter start a coroutine that waits a certain amount of time before doing something, for example in C# you can do: float delay = 1.0f; void OnTriggerEnter(Collider other){ StartCoroutine(AfterEnter()); } IEnumerator AfterEnter() { yield return new WaitForSeconds(delay); //Do whatever you need. yield break; }

Viewing all articles
Browse latest Browse all 16

Trending Articles



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