fix: clamping camera fov
This commit is contained in:
parent
67d59a161d
commit
a55fe18a6c
|
@ -14,7 +14,7 @@ void PlayerCamera::on_look_input(Vector2 input) {
|
||||||
|
|
||||||
void PlayerCamera::update_fov() {
|
void PlayerCamera::update_fov() {
|
||||||
if (!Engine::get_singleton()->is_editor_hint() && is_ready()) {
|
if (!Engine::get_singleton()->is_editor_hint() && is_ready()) {
|
||||||
set_fov(this->base_fov * this->fov_factor);
|
set_fov(CLAMP(this->base_fov * this->fov_factor, 1, 179));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue