I'm using a ConeLight at 180 degrees, with this setup:
pl = new ConeLight(rayHandler, 256, new Color(0.5f, 0.5f, 0.5f, 1f), 280f, 400 - x, 300 - y, 0, 180);
And the object I'm casting a shadow on (with?) is set up like so:
sprite = new Sprite(new Texture(imgP)); BodyDef bodyDef = new BodyDef(); bodyDef.type = BodyType.DynamicBody; bodyDef.position.set(x - 392.5f, y - 292.5f); body = Main.world.createBody(bodyDef); PolygonShape pushBlock = new PolygonShape(); pushBlock.setAsBox(((float) w / 2), ((float) h / 2)); FixtureDef fixtureDef = new FixtureDef(); fixtureDef.shape = pushBlock; fixtureDef.density = 0.5f; fixtureDef.friction = 0.8f; fixtureDef.restitution = 0f; Fixture fixture = body.createFixture(fixtureDef); body.setUserData(sprite); body.setGravityScale(0); body.setFixedRotation(true); body.setLinearDamping(40f); pushBlock.dispose(); The problem is that the light creates the shadows in a sort of glob form in the center of the square (not casting nicely around the corners as I've seen in others' projects), also leaving nearly the whole sprite black. I require the ambient colour to be black, and also require shadows, so Xray is out. I've messed around with filters but haven't been able to achieve what I want - being able to cast shadows without overshadowing the sprite.
Is it possible? How might I do this, if possible?
Edit: I took a screenshot.