armory/Sources/armory/logicnode/GetCameraFovNode.hx

19 lines
326 B
Haxe
Raw Normal View History

2017-12-06 22:20:42 +01:00
package armory.logicnode;
import iron.object.CameraObject;
class GetCameraFovNode extends LogicNode {
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2017-12-06 22:20:42 +01:00
super(tree);
}
2019-12-19 23:54:08 +01:00
override function get(from: Int): Dynamic {
var camera: CameraObject = inputs[0].get();
2017-12-06 22:20:42 +01:00
if (camera == null) return 0.0;
return camera.data.raw.fov;
}
}