What does a raycast primarily do?
Physics.Raycast(origin, dir, out hit, range);
- Test what a ray hits first
- Move the object forward
- Play a targeting sound
- Spawn a particle burst
A raycast reports the first collider a ray intersects, used for aiming and detection.
Play Game Dev ▸