Beam dimmer - dvdvideo1234/LaserSTool GitHub Wiki

Description

This scripted entity is designed to make the beam weaker by multiplying its output to the dot product between its direction and surface normal.

divider

Turning the entity ON / OFF

The entity will be turned on whenever the input beam hits it. If there is no beam present, this means the input beam is not in sync with the surface normal vector of the dimmer. The vectors are in sync when the input beam hits the proper surface of the dimmer entity.

Calculating output beam

The output beam behavior and visuals ( texture, sounds, color, flags etc. ) will be taken from the beam source entity from the current hit report and the power is relative to the incident ray direction dot product with the surface normal. The dimmer can process many beams at the same time.

Wire behavior

This entity has only one input that is the normal local surface vector and some outputs for information.