diff options
author | Clay John <claynjohn@gmail.com> | 2022-10-27 09:44:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 09:44:21 -0700 |
commit | 682156e1f0b6fba8debba7c88a0a733e95baaac3 (patch) | |
tree | fe68cc8655c4a38a7244f3392149aa79fb254ae1 /editor | |
parent | 7904f70dc438a1b0a644b971c2089383ef776d2f (diff) | |
parent | 7f9a8c99c93693023a96eb08afd3d9a723663279 (diff) |
Merge pull request #66383 from aaronfranke/basis-from-euler
Clean up Basis from Euler code
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_scene.h | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 498e9f2964..5f64330453 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -474,7 +474,7 @@ Transform3D ResourceImporterScene::get_collision_shapes_transform(const M &p_opt } if (p_options.has(SNAME("primitive/rotation"))) { - transform.basis.set_euler((p_options[SNAME("primitive/rotation")].operator Vector3() / 180.0) * Math_PI); + transform.basis = Basis::from_euler(p_options[SNAME("primitive/rotation")].operator Vector3() * (Math_PI / 180.0)); } } return transform; diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index e5d4b262aa..b033b0c00f 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2986,7 +2986,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { Transform3D xform; if (orthogonal) { xform = sp->get_global_transform(); - xform.basis.set_euler(camera_transform.basis.get_euler()); + xform.basis = Basis::from_euler(camera_transform.basis.get_euler()); } else { xform = camera_transform; xform.scale_basis(sp->get_scale()); @@ -7615,7 +7615,7 @@ void Node3DEditor::_preview_settings_changed() { { // preview sun Transform3D t; - t.basis = Basis(Vector3(sun_rotation.x, sun_rotation.y, 0)); + t.basis = Basis::from_euler(Vector3(sun_rotation.x, sun_rotation.y, 0)); preview_sun->set_transform(t); sun_direction->queue_redraw(); preview_sun->set_param(Light3D::PARAM_ENERGY, sun_energy->get_value()); |