waverider Posted December 8, 2017 Share Posted December 8, 2017 Hy! i'm working on a rpg project, as you can see in this demo the shadow of my dummy player is not coming out well. ice_video_20171207-224832_edit_404.webm is there a function to be able to scale the shadow to the desired scale? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted December 8, 2017 Share Posted December 8, 2017 I'm not sure if I understand your question, but I think the only way to make a shadow longer is to change the light source position relative to the mesh that casts the shadow (ie: make light source lower will make a longer shadow) - just like a sunset. Quote Link to comment Share on other sites More sharing options...
waverider Posted December 8, 2017 Author Share Posted December 8, 2017 not exactly like changing the light settings, it messes the whole scene. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 8, 2017 Share Posted December 8, 2017 Not sure to see the problem Can you create a repro in the PG? Quote Link to comment Share on other sites More sharing options...
waverider Posted December 8, 2017 Author Share Posted December 8, 2017 http://www.babylonjs-playground.com/#S712ML#1 i tried to lower the light source, but it's not giving any long shadow, i want the shadow to be twice as big as the torus. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted December 9, 2017 Share Posted December 9, 2017 hi waverider. Lots going on in that PG - what about this one. the length of the shadow is controlled by the light position. if you parent the light to your character maybe would have the effect you want:https://playground.babylonjs.com/#W5D4MN Quote Link to comment Share on other sites More sharing options...
waverider Posted December 9, 2017 Author Share Posted December 9, 2017 @brianzinn thanks! i normalized the direction of the source of light and it worked brianzinn 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted December 9, 2017 Share Posted December 9, 2017 great! you can mark as solved, if it is (see sticky forum thread). cheers. waverider 1 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.