Hello, I am very new at this, I’m not a programmer so, please, be nice to me.
I’ve been stealing code from the forums, >.< and now I can finally render some primitives, but there is no shadow.. I have one cube acting as ground and a few primitives. but the primitives don’t cast any shadow to the cube (ground)
Can anyone give me the code for shadow casting;
This is what I have:
private function initLights():void
{
//create a light for the camera
pointLight = new PointLight();
pointLight.y+=500;
scene.addChild(pointLight);
trace("coord Luz x="+pointLight.x+ " y="+pointLight.y+" z="+pointLight.z);
lightPicker = new StaticLightPicker([pointLight]);
var sunPointLight:PointLight = new PointLight();
sunPointLight.specular = 0;
scene.addChild(sunPointLight);
}
Thanks a lot in advance.