It does however give shadows off onto the wall when its right on it however it does not do it on the floor neither when its a little distance from any other object like so.
The walls project light onto the floor like u can see on my game however on smaller objects it does not. I have no idea how it doesn’t and would like it to be how it is in the second screenshot
At the moment in my code I am doing this.
var ligh = new BABYLON.DirectionalLight(“DirectionalLight”, new BABYLON.Vector3(1, -1, 1), scene);
ligh.diffuse = new BABYLON.Color3.FromHexString(light);
ligh.position = new BABYLON.Vector3(0, 0, 0);
ligh.intensity = 1;
However shouldnt there be a shadow on the floor where i am stood aswell due to the ceiling also there is still no shadow around the cube objects to the right?
Would be great to see what you do in a playground or s live demo (preferably playground ). Because my first question from the code above is - is the ground set to receive shadows?
I think you might need to move the position, because at 0,0,0 low objects might get clipped from the shadowProjection. Think of the shadow pass as a camera at a position with the direction as its “rotation” and an orthographic projection. That is how the system generates the shadowMap (I think).
Take your direction and then normalize it then scale it by approx -half the scene size, then set that as your directional lights position. See if that fixes it. There are a lot of assumptions like that your scenes origin is 0,0,0 etc for this to work but I bet it will get you going the right way regardless.