EnableShadow
From MaratisWiki
(Difference between revisions)
(Created page with "Enable or disable shadow casting on the light object. All objects affected by light with enabled shadow casting will cast shadows on itself and on other objects. Example: li...") |
Dahnielson (Talk | contribs) m |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lua-function|enableShadow|object, bool}} | ||
+ | |||
Enable or disable shadow casting on the light object. All objects affected by light with enabled shadow casting will cast shadows on itself and on other objects. | Enable or disable shadow casting on the light object. All objects affected by light with enabled shadow casting will cast shadows on itself and on other objects. | ||
− | + | {{lua-function-param|object|object to operate on}} | |
+ | {{lua-function-param|bool|state}} | ||
+ | |||
light = getObject("Sun") | light = getObject("Sun") | ||
-- Enable shadow casting | -- Enable shadow casting | ||
Line 9: | Line 13: | ||
To check if shadow casting is enabled use [[isCastingShadow]] | To check if shadow casting is enabled use [[isCastingShadow]] | ||
+ | |||
+ | [[Category:Lua scripting]] | ||
+ | [[Category:Lua function]] | ||
+ | [[Category:Object]] |
Latest revision as of 01:16, 9 February 2014
enableShadow(object, bool)
Enable or disable shadow casting on the light object. All objects affected by light with enabled shadow casting will cast shadows on itself and on other objects.
-
object
: object to operate on -
bool
: state
light = getObject("Sun") -- Enable shadow casting enableShadow(light, true) -- Disable shadow casting enableShadow(light, false)
To check if shadow casting is enabled use isCastingShadow