zhutq Posted May 11, 2017 Share Posted May 11, 2017 Hi, I'm trying to make a light: has fixed position relative to the viewer (camera); casts shadows. I set camera as the light's parent to achieve (1). But the shadow seems not updated as camera orbits. Playground: https://playground.babylonjs.com/#GWK0TQ Can I tell the shadow map to refresh? Thank you very much! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 11, 2017 Share Posted May 11, 2017 Hello the map is refreshed but the direction remains unchanged. The light position is influenced by the parent but not the direction zhutq 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted May 11, 2017 Share Posted May 11, 2017 If you want the shadows to remain fixed relative to the viewer with ArcRotate - how about something like this? https://playground.babylonjs.com/#GWK0TQ#2 Change radiansFromCameraForShadows variable for the direction where shadows are cast from. Dad72 and zhutq 2 Quote Link to comment Share on other sites More sharing options...
zhutq Posted May 12, 2017 Author Share Posted May 12, 2017 I see.. I'll go with the radiansFromCameraForShadows solution Thank you very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.