oOve / lasers

FoundryVTT module for lasers, or lightbeams that can be colored, or reflected using mirrors.
MIT License
0 stars 1 forks source link

Perfectly straight beams? #15

Closed Bobsson closed 1 year ago

Bobsson commented 2 years ago

I'm trying to use this to provide a line of lighted floor tiles. It's not exactly the "bouncing laser" usecase, but this is the only module I've found that can provide anything even close to a linear light source. However, I can't seem to get beams of light which neither narrow nor widen as they go. At a 1 degree angle, the beam gradually gets narrower as it goes, while at a 2 degree angle, it gets noticeably wider. 1.5 would probably be perfect, but it has to be a whole number.

It might help if there was a way to adjust the width of the beam at the start, but that may just then affect the far end equally.

Visual: Two degree beam One degree beam

oOve commented 2 years ago

The "laser" is as it is because I'm cheating. Initially I wanted to stay away from tweaking with Foundrys internal lighting algorithm, but I found a "quick hack" that made it look much better. The light starts out shaped like a pie-slice, but then the starting points are "pulled out" by a given thickness. Since it is "pie slice" shaped it will get thicher the further away it reaches before hitting something. ps. There is a setting for laserwidth in the start (in module settings).

If the internal lighting module is unchanged for V10 of Foundry, I might actually implement a parallell laserbeam.

oOve commented 1 year ago

The V10 release 10.0.1 is now featuring perfectly straight beams :)