0

How can I use a shader that interacts with my environment that is not with box2d.

I read this: Libgdx light without box2d

Talking about how I could do a circle light fixture with a sprite. The question I have is: How can I create a ray cast, like from a streetlight (for example).

The sprite shown is a circle, Would I have to create another sprite to deal with this? I want something like this: inlined image

How would I start this?

Community
  • 1
  • 1
Andy Ma
  • 23
  • 1
  • 4
  • You'll need to provide a lot more details. What sort of environment are you rendering? (2d or 3d?) What does your code look like to draw the tiles and light source? – P.T. May 14 '15 at 03:54
  • Alright, so I want to do this on a 2D screen. – Andy Ma May 16 '15 at 00:45
  • I use a TileMap.java file to render and draw my tileset. http://pastebin.com/5vFpLtxE then I render it inside a playstate. – Andy Ma May 16 '15 at 00:46

0 Answers0