2D Toolkit Forum
2D Toolkit => Support => Topic started by: 8BitGuy on February 08, 2014, 04:36:04 pm
-
Hello, I have bought 2dtoolkit a few months ago and I am amazed with this incredible toolkit.
Now, I'm having a little problem, it is the first time I use lights with 2d toolkit and it works perfectly but in one case, if the sprite rotation.y =180 the sprite inmediatly has no light, I tried all the materials 2dtoolkit include in the version 2.1 final + hotfix 1.
I'm asking if there is a way to light a sprite if its rotation.y is 180 or 0.
thanks for your support.
keep doing a good job!!
-
Have you turned on normals in sprite collection settings?
-
Thanks for your reply unikron.
Yes, I have turned normals and tangents
-
I'm not sure why it wouldn't work - it should just work fine. What light have you got and what position is it at? Or if you prefer, post a repro scene here.
-
hello I tried with different lights and positions, the player position.z is 0, a spot light at position z = -7.3 it works on the player sprite rotation.y =0 but not at player sprite rotation.y=180
player rotation.y=0
(http://i61.tinypic.com/2hqh021.png)
player rotation.y=180
(http://i60.tinypic.com/148pzkh.png)
and the same with a point light at z = -2.5
(http://i62.tinypic.com/w0rnnl.png)
(http://i60.tinypic.com/148pzkh.png)
-
Thanks for the pics it explains a lot, thats kinda expected behaviour as the light isn't facing the sprite. It looks like you want 2 sided sprites - in sprite collection editor, select your sprites, set Render Mesh to "Double Sided", Apply and Commit.
-
The problem is solved, I have to change sprite by sprite to double sided as you said.
THANKS A LOT UNIKRON!!!