Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FREQ - Set a light to be active but not illuminate #83

Open
adam-law opened this issue Sep 8, 2015 · 0 comments
Open

FREQ - Set a light to be active but not illuminate #83

adam-law opened this issue Sep 8, 2015 · 0 comments

Comments

@adam-law
Copy link

adam-law commented Sep 8, 2015

Hi,

I think this would be a nice feature to have, to use in conjunction with Box2D and sensors. I was able to get the polygon made from the lit area of a light, and use that to create a Box2D body, fixture and sensor from this. However, this makes it reliant on the light being active before being able to get its shape, and sometimes, I don't want the light to be lighting anything, especially when I use the same system to carve out fog of war. Transparency is not an option a lot of imes, because of the blending involved with FoW etc. The best way would be a toggle to keep the light active, but not giving off light, while still interacting (raycasting) with Box2d objects.

An application for this feature would be toggling the light source to shed light, when an entity steps into its sensor range. In my specialized case, once a light starts illuminating, I can combine it's light field to the character's vision field, to create the actual visual area, and trigger/update all reliant controls, e.g. minimap, game events etc.

On a side note, I saw a FREQ for the ability to shed light to an FBO. I could perhaps use that to calculate light fields, cache them, and switch the lights off, although I think my FREQ is a simpler one to implement, and more accessible to novice users.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant