2D Toolkit Forum
2D Toolkit => Support => Topic started by: DahongPunyal on February 03, 2014, 02:23:03 am
-
Is there any tutorial available to create a spotlight effect (almost similar to this post http://2dtoolkit.com/forum/index.php/topic,3118.msg15314.html#msg15314 (http://2dtoolkit.com/forum/index.php/topic,3118.msg15314.html#msg15314)) using tk2d?
I am using Orthographic camera (normal one). I also tried to switch the shader to lit one, and the collections' Normal Generation is set to Normals Only.
(http://i57.tinypic.com/dfk6e1.jpg)
When I use the lit shaders, the sprites darken but when I tried to apply a spotlight, nothing happens. Can I have any idea of how to do it, if there's no tutorial available or any other technique to achieve this? Also, I am new to Unity3D.
Thanks!
-
Does it do anything if you have a unity sphere the same size at the same location? Does it work with an omni light / directional?
-
I works now. I changed the shader from lit to diffuse :D.
Thank you!
-
Oh, another thing.
I tried to used tk2d/LitBlendVertexColor, normals selected, and the lighting doesn't work.
-
It does, but its vertex lit. It won't work with very small (smaller than a triangle) lights. Diffuse will work with pixel lights.
-
Thank you!
The problem was just with the position and rotation. We can really close this thread now!
Thanks a lot!