2
0
Эх сурвалжийг харах

33756 gltf2 importer should use zfar

K. S. Ernest (iFire) Lee 5 жил өмнө
parent
commit
d0de373884

+ 2 - 2
editor/import/editor_scene_importer_gltf.cpp

@@ -2494,9 +2494,9 @@ Camera *EditorSceneImporterGLTF::_generate_camera(GLTFState &state, Node *scene_
 
 	const GLTFCamera &c = state.cameras[gltf_node->camera];
 	if (c.perspective) {
-		camera->set_perspective(c.fov_size, c.znear, c.znear);
+		camera->set_perspective(c.fov_size, c.znear, c.zfar);
 	} else {
-		camera->set_orthogonal(c.fov_size, c.znear, c.znear);
+		camera->set_orthogonal(c.fov_size, c.znear, c.zfar);
 	}
 
 	return camera;