DudeAwesome Posted January 26, 2014 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?
Shirk Posted January 26, 2014 Posted January 26, 2014 You have to define what shadow mode it is, use self.flashlight:SetShadowMode(Light.Dynamic+Light.Static+Light.Buffered) Quote
DudeAwesome Posted January 26, 2014 Author 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?
gamecreator Posted January 26, 2014 Posted January 26, 2014 Under material: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetshadowmode-r257 Quote
DudeAwesome Posted January 26, 2014 Author 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?
gamecreator Posted January 26, 2014 Posted January 26, 2014 Could be a bug but would you like to share your project so we could test it? Quote
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.