summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gltf/gltf_document.cpp')
-rw-r--r--modules/gltf/gltf_document.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 3adeaefbaf..5eaa1741ea 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -4888,12 +4888,12 @@ GLTFCameraIndex GLTFDocument::_convert_camera(Ref<GLTFState> state, Camera3D *p_
if (p_camera->get_projection() == Camera3D::Projection::PROJECTION_PERSPECTIVE) {
c->set_perspective(true);
c->set_fov_size(p_camera->get_fov());
- c->set_zfar(p_camera->get_zfar());
- c->set_znear(p_camera->get_znear());
+ c->set_zfar(p_camera->get_far());
+ c->set_znear(p_camera->get_near());
} else {
c->set_fov_size(p_camera->get_fov());
- c->set_zfar(p_camera->get_zfar());
- c->set_znear(p_camera->get_znear());
+ c->set_zfar(p_camera->get_far());
+ c->set_znear(p_camera->get_near());
}
GLTFCameraIndex camera_index = state->cameras.size();
state->cameras.push_back(c);