Fix fov setting in debug console

This commit is contained in:
luboslenco 2019-01-28 11:37:34 +01:00
parent 7b7260d647
commit 1d47ec184a

View file

@ -306,8 +306,7 @@ class DebugConsole extends Trait {
}
else if (Std.is(selectedObject, iron.object.CameraObject)) {
selectedType = "(Camera)";
var scene = iron.Scene.active;
var cam = scene.cameras[0];
var cam = cast(selectedObject, iron.object.CameraObject);
var fovHandle = Id.handle({value: Std.int(cam.data.raw.fov * 100) / 100});
cam.data.raw.fov = ui.slider(fovHandle, "FoV", 0.3, 2.0, true);
if (ui.changed) {