Directional Lights
Posted
by
Setrio
on Game Development
See other posts from Game Development
or by Setrio
Published on 2012-10-16T22:25:24Z
Indexed on
2012/10/16
23:21 UTC
Read the original article
Hit count: 134
I'm working on a game idea (2D) that needs directional lights. Basically I want to add light sources that can be moved and the light rays interact with the other bodies on the scene.
What I'm doing right now is some test where using sensors (box2d) and ccDrawLine I could achieve something similar to what I want. Basically I send a bunch of sensors from certain point and with raycast detect collisions, get the end points and draw lines over the sensors.
Just want to get some opinions if this is a good way of doing this or is other better options to build something like this?
Also I would like to know how to make a light effect over this area (sensors area) to provide a better looking light effect. Any ideas?
© Game Development or respective owner