DudeAwesome Posted January 26, 2014 Share Posted January 26, 2014 Hiho I created a Spotlight with self.flashlight = SpotLight:Create(self.entity) but all objects drop no shadows. when I create a spotlight in the editor my objects drop shadows.. is there a way to enable shadows from code side? Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Shirk Posted January 26, 2014 Share Posted January 26, 2014 You have to define what shadow mode it is, use self.flashlight:SetShadowMode(Light.Dynamic+Light.Static+Light.Buffered) Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 26, 2014 Author Share Posted January 26, 2014 thx but also it will not work ;( where you see that command in the api? a spotlight earns functions from object/entity/light and I cant see a function like "SetShadowMode()" Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
gamecreator Posted January 26, 2014 Share Posted January 26, 2014 Under material: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetshadowmode-r257 Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 26, 2014 Author Share Posted January 26, 2014 mhmm I dont know what a material has to do with a light entity? my shadows working when I use a Spotlight from the editor IF I DONT CHANGE SOMETHING and use a spotlight from codeside My shadows will not be dropped. So i thought I have to turn on shadows from the lightsettings but it looks like I have to do from material side but I dont get behind it why it will not work with my code light Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
gamecreator Posted January 26, 2014 Share Posted January 26, 2014 Could be a bug but would you like to share your project so we could test it? 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.