Removal of Light from root, use within LightNode

From my view, Its simple. A light isn’t a node so dont use attachChild(light); or detachChildNamed(light);

Its like putting apples in a box of oranges.

Here is my light on the player. With setPosition you specify where the light will be on seen. I put that method on simple update so it can move.

[java]

private PointLight playerLight = new PointLight();

playerLight.setRadius(10);

rootNode.addLight(playerLight);

@Override

public void simpleUpdate(float tpf)

{

playerLight.setPosition(player.localToWorld(lightPosition,null));

}

[/java]

Hmm ok! I saw the light node source code now, and i don’t know if disabling/enabling a control does anything if its controller has no parent, because i looked at your code and in “disableFire” method you are first detaching the light node from its parent and after that you set it disabled. Maybe inverting the lines 70 and 71 works.