summaryrefslogtreecommitdiff
path: root/tools/editor/io_plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-03-03 14:39:13 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-03-03 14:39:13 -0300
commit4d2198110b4af7f203eeef95697255569e49bce7 (patch)
tree452e4964f127643bf52610718fd956d8b55ed6ba /tools/editor/io_plugins
parent91faf8e21810c8995e4f6e3b6ba47a6482ab877e (diff)
merges from okam repo
Diffstat (limited to 'tools/editor/io_plugins')
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index 529ed3374b..6dd46843cc 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -285,13 +285,16 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
case Collada::CameraData::MODE_ORTHOGONAL: {
- if (cd.orthogonal.x_mag) {
+ if (cd.orthogonal.y_mag) {
- camera->set_orthogonal(cd.orthogonal.x_mag,cd.z_near,cd.z_far);
+ camera->set_keep_aspect_mode(Camera::KEEP_HEIGHT);
+ camera->set_orthogonal(cd.orthogonal.y_mag*2.0 ,cd.z_near,cd.z_far);
- } else if (!cd.orthogonal.x_mag && cd.orthogonal.y_mag) {
+ } else if (!cd.orthogonal.y_mag && cd.orthogonal.x_mag) {
- camera->set_orthogonal(cd.orthogonal.y_mag * cd.aspect,cd.z_near,cd.z_far);
+
+ camera->set_keep_aspect_mode(Camera::KEEP_WIDTH);
+ camera->set_orthogonal(cd.orthogonal.x_mag*2.0,cd.z_near,cd.z_far);
}
} break;