WetDesertRock wrote:If you set the light worlds translation by the same value you set loves translation, and it messes up, then its a bug I think. But you should set both values to the same.
I put this at the start of my love.draw() just to test:
SNK1337 wrote:How exactly is translation used with this? If I use the lightWorld.setTranslation() before drawing everything, I get this: http://puu.sh/82uxo.jpg while it's supposed to look like this: http://puu.sh/82uyY.jpg
Do I also have to use love.graphics.translate() at some point? Or are there any other functions I need to get it working properly?
can you post or send me a little code example with your translation functions for testing. I personally don't use camera translations in my projects, because it cause many problems , so maybe there is a tiny bug in the engine.
SNK1337 wrote:How exactly is translation used with this? If I use the lightWorld.setTranslation() before drawing everything, I get this: http://puu.sh/82uxo.jpg while it's supposed to look like this: http://puu.sh/82uyY.jpg
Do I also have to use love.graphics.translate() at some point? Or are there any other functions I need to get it working properly?
can you post or send me a little code example with your translation functions for testing. I personally don't use camera translations in my projects, because it cause many problems , so maybe there is a tiny bug in the engine.
I just created a little example .love that should let you translate by (10, 10) by holding k. Not really a camera, but I suppose it should be enough for demonstration purposes.
I have the feeling I'm just misunderstanding something and doing it wrong, so please tell me if there's some mistake I'm making. I also tried the getLightTranslation function above by the way, and got similar results, which is why I didn't include it.
My actual camera does pretty much the same thing as this: push, translate, draw stuff, pop. I just felt it'd be easier to make something simpler here for testing.
Is there any way to specify a larger light "shape"?
For instance, a space-ship themed game with lasers, the lasers are continuous rather than a short beams.
Each laser is a light source all over its "body", almost like a long rectangular light source.
I can achieve the effect using many sources in increments but that can be stressful in the long run and can create odd shadows...
My game is a top-down point of view.
So shadowType image is not quite what I want to cast shadows for my sprites.
I'm trying to use polygon shadowType instead but I'm still getting a rectangle shadow.
Anyone know how to make a shadow based on an image(Like this http://onepixelahead.de/love2d_polyshadow18.png)? The documentation is not super clear on that yet (understandable as this is still quite early on).
Yeah, but if you have a transparent image with like a circle or triangle, then the shadow is still a square. It just takes the dimensions of the image without accomplishing the effect that I linked to.