Ray Handler
This laser beam is controlled by a Ray handler script
This component controls a Line renderer to work as a laser. It uses a Physics Raycaster to determine if the laser hits something. Resizes the line renderer to match the raycast result.
Note: Rays can be only controlled by a Ray Handler.
  • Play On Awake: activates the effect on awake.
  • Delay: how long (in seconds) before the laser becomes visible after activation.
  • Line Renderer: Line renderer that represents the laser.
  • Spark Particle: A particle that appears at the end of the laser where it hits something.
  • Max Distance: How far can the laser extends.
  • Obstacle Layer Mask: You can ignore certain layers that do not interrupt the laser beam.
Copy link