forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
20
leenkx/Sources/leenkx/logicnode/SetCameraNode.hx
Normal file
20
leenkx/Sources/leenkx/logicnode/SetCameraNode.hx
Normal file
@ -0,0 +1,20 @@
|
||||
package leenkx.logicnode;
|
||||
|
||||
import iron.object.CameraObject;
|
||||
|
||||
class SetCameraNode extends LogicNode {
|
||||
|
||||
public function new(tree: LogicTree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
override function run(from: Int) {
|
||||
var camera: CameraObject = inputs[1].get();
|
||||
if (camera == null) return;
|
||||
camera.buildProjection();
|
||||
|
||||
iron.Scene.active.camera = camera;
|
||||
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user