Sign in to follow this  

Shadows problem

Recommended Posts

I have two types of shadow generator. For static elements and for dynamic. I have problem with shadow generator for dynamic meshes. At the begging of the scene i cannot see my light and shadows instead that I see artifacts, but when i go to specific point in scene everything start working correctly. I attach video to show it in example.

Share this post

Link to post
Share on other sites

This is spot light generated using this code:

 const playerLight = new BABYLON.SpotLight("playerLightSpot",
                new BABYLON.Vector3(0, 45, 0),
                new BABYLON.Vector3(0, -1, 0),
            playerLight.diffuse = new BABYLON.Color3(1, 0.7, 0.3);
            playerLight.angle = 0.7;
            playerLight.exponent = 70;
            playerLight.intensity = 0.8;
            playerLight.parent = playerMesh;

And then after recive information from socket about monsters I add it using:


If I use only player shadow then shadow is OK. But when i add monsters then i saw bugged shadow and light like this in video.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.