November 2019
Intermediate to advanced
404 pages
12h 9m
English
All of the raycasting methods are incredibly useful, but they are relatively expensive, particularly CapsuleCast() and SphereCast(). We should avoid calling these methods regularly within the Update() callbacks or coroutines, saving them only for critical events in our script code.
If we're making use of persistent line, ray, or area-of-effect collision areas in our scene (examples include security lasers, continuously burning fires, and beam weapons), and the object remains relatively stationary, then they would perhaps be better simulated using a simple trigger volume.
If such replacements are not possible, and we truly need persistent casting checks using these methods, we should minimize ...
Read now
Unlock full access