Questions tagged [box2dlights]

Box2dLights is a open source framework for dynamic 2d lights and shadows for android and desktop using box2d physic geometry and raycasting.

Box2DLights is a 2D lighting framework that uses box2d for raycasting and OpenGL ES 2.0 for rendering. This library is intended to be used with libgdx.

34 questions
0
votes
1 answer

what does particleEmitter.start() method do in particle emitter class?

whether I put start() method or not my particle emitter runs the same way, So what is the use of start() method.
shubham
  • 49
  • 7
0
votes
1 answer

why DirectionalLight is not casting shadow?

Code: Color color = new Color(1f,1f,1f,0.9f); DirectionalLight directionalLight = new DirectionalLight(rayHandler,200,color,-90f); directionalLight.setSoftnessLength(0); Result: When light falls directly from above, why it is not casting shadows…
0
votes
1 answer

Cone light direction Degree parameter doing nothing what ever value i give?

coneLight = new ConeLight(rayHandler,100,Color.WHITE,200/PPM,0,0,30,30); At directionDegree = 30 coneLight = new ConeLight(rayHandler,100,Color.WHITE,200/PPM,0,0,60,30); At directionDegree = 60 coneLight = new…
0
votes
0 answers

LIBGDX Box2D Lights on Ios-Moe

My question is self explainatory: is it possible to use Box2D and Box2D lights on a ios-moe build of LIBGDX? I can run it on my desktop but I get the following error when I launch on IOS: java.lang.UnsatisfiedLinkError: No implementation found for…
SirTrashyton
  • 173
  • 2
  • 3
  • 12
0
votes
0 answers

Box2d Lighting different behavior with different screen size

I tried to play a little with lighting, but very quickly I came upon weird behavior that I dont understand. Could anybody explain to me, why this happens, if it is on purpose, or I do something wrong. On the first image, light goes little trough…
Gobanit
  • 243
  • 2
  • 14
0
votes
1 answer

Attaching box2dLight to scene2d.Actor

As a part of my game I am moving a car on Stage and trying to put headlights on the same. I am setting actions on the CAR so that position update of CAR will be handled by scene2d.actions.Actions. This is the code I am using to set…
hello123
  • 391
  • 4
  • 15
0
votes
0 answers

LibGDX with Box2DLights: How to fix "Array Buffer Object"-Exception?

I'm using Box2DLights with LibGDX. But everytime I'm running the app, only one frame will pop up and immediately the exception will get thrown like that: Exception in thread "LWJGL Application" org.lwjgl.opengl.OpenGLException: Cannot use offsets…
EchtFettigerKeks
  • 1,692
  • 1
  • 18
  • 33
0
votes
2 answers

Box2dlights textures isn't drawn

I am using box2dlights in my project and there seem to be an issue. When I actually use RayHandler in the program, only the light is drawn but no textures. And so when I remove RayHandler from the render loop it all works fine. I want the light to…
S. O. Chaos
  • 136
  • 1
  • 7
0
votes
2 answers

libgdx/box2d lights: change blur of lights

I was wondering whether it is possible to change the rate at which a lights intensity decareases over distance. something like this:
Fungaria
  • 1
  • 2
0
votes
2 answers

Box2dLights: Fatal error when disposing lights + ConeLight doesnt work

thanks for dropping over. I got 2 issues with Box2DLights. The first one isn't that important to solve, the second, however, #1 : disposing lights I got multiple PointLights that follow a porjectile. So every porjectile has an ArrayList with all…
Crea Teeth
  • 13
  • 5
0
votes
2 answers

box2d light - the shadow is the same lighting of the color

I am new to libGDX and Box2dlights i made a point light but there is a very weird problem the shadow is the same color of the point light - this is so weird when my sprite cross the light range it casts a shadow with the same color of the point…
King Gamer
  • 23
  • 4
0
votes
2 answers

Box2d Lights || Conelight Passes Over Body When Colliding

thanks for reading my post. I am using box2d lights, and it is mostly working good, except for 1 problem. When A conelight goes ontop of a body that light collides with, the light passes over the object. I want to make it so that if the conelight…
Wyatt
  • 493
  • 7
  • 18
0
votes
1 answer

libGDX/Box2DLights Color Banding on Android

I am using Box2DLights in one of my project. I worked on this project for a couple of month now, and I just tried to port it on Android, to see how it looks. While the light effect look very nice on the desktop version of the game, it looks really…
vdlmrc
  • 737
  • 5
  • 17
0
votes
1 answer

Box2d Light consumes too much battery

I'm making a simple game with my friends in Android using libgdx game engine. We use "conelight" object of box2dlights extension in the game. Our problem is that after putting "conelight" in a game, our app starts to consume too much battery. Is…
user2668186
0
votes
1 answer

how I check collision with box2dlights in libgdx?

It is possible to detect when a body is under light? ( Collision with the light and a body ) How I check this with libgdx? Sorry for my english...
walter jr
  • 25
  • 3