Merge pull request #44758 from madmiraal/fix-camera-merge

Fix GLTF after camera near and far rename merge
This commit is contained in:
Rémi Verschelde 2020-12-28 15:40:48 +01:00 committed by GitHub
commit 1a86a4b291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);