Use-Cases of Raycasting?

Hello Developers! :wave:

Can someone give me some use-cases on when to use raycasting other than using it for laser beams and guns. Thanks!

Stuff I’ve worked with using raycasting recently:

  • Determining whether two points have line-of-sight.
  • Determining distance to the floor, and what object the floor is.
  • Mouse.Hit uses raycasting.
  • Snapping to other objects in a 3d placement system.

There’s a whole lot more use cases for it, I haven’t spent enough time exploring all the possibilities of them.

1 Like

You could use raycasting to make this. See where the ray lands and then shade it according to the distance from the camera. (Note this is on a GPU so this will be pixelated on boblox)

1 Like