t3du - Add SetLightShadowNode for controlling light shadows

This commit is contained in:
2025-06-27 17:57:26 +00:00
parent 1d0b338d92
commit 91b3072305

View File

@ -0,0 +1,21 @@
package leenkx.logicnode;
import iron.object.LightObject;
class SetLightShadowNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var light: LightObject = inputs[1].get();
var shadow: Bool = inputs[2].get();
if (light == null) return;
light.data.raw.cast_shadow = shadow;
runOutput(0);
}
}