skip to content
Scalable Hacker Blog

Search

Bouncing Laser (Practice 2)

Less than one minute read Updated:
Assignment 2

The concept of Raycast and reflection

This is part of Math for Game Devs by Freya Holmér

Interactive Demo

5

42

Coverted to Three.js & R3F

  • Use Unity’s raycast function to create a bouncing laser in a scene of objects, where you can configure the number of bounces
  • You are not allowed to use Unity’s .Reflect functions, the goal is to figure out how to write your own, using what we’ve learned during the first lecture!

Code

GitHub