libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
256 stars 81 forks source link

Create Spot light #63

Closed felipefcm closed 7 years ago

felipefcm commented 9 years ago

Create a Spot light type, which could be just a point light with limited radius range and constant falloff.

rinold commented 9 years ago

Hi, sorry for a late answer, just to clarify - you mean that the SpotLight should be like the PointLight except one that it is not appropriate for your usage, cause it has no constant falloff and provides the same illumination inside of it's range - and you want the shadow to be linear growing from point light center to it's borders?

felipefcm commented 9 years ago

Thanks for the answer. I'm afraid that I used the term 'falloff' in a wrong way, I thought it was the rate of intensity drop from the center, but it looks like it's an angle value that determines where the drop actually starts. I just imagined some sort of 'prison light', it basically have constant intensity inside the circle and virtually none out of it's radius. That effect can be achieved using a point light?

rinold commented 9 years ago

I'm afraid the problem was in my non-nativeness of english :) However, I think yes - the PointLight should behave the way you described. You can also try the test project in box2dlights where all light types should be present to see if their behavior will be acceptable for your needs.