Object color

hello i have add a arrow to my scene:



   Arrow yAxe = new Arrow("ArrowY", 100, 2);
   yAxe.setRandomColors() ;
   yAxe.updateRenderState() ;
   rootNode.attachChild(yAxe);



why arrow don't have an any color ??

Probably because your lights are on.



Eduard

there are two kind of colors:

You can use a MatrialState and Light to color your objects or use vertex colors.



In your example you use vertex colors, to make them visible, you need to disable lighting on your object (as mastershadow pointed out).



yAxe.setLightCombineMode(LightCombineMode.Off); // jme2
// yAxe.setLightCombineMode(LightState.OFF);  jme1

OK thanks. now it works great