$ ./guess_the_languageGame Dev
Game Dev · medium · #113

What does a raycast primarily do?

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