summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-09-24 18:19:55 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-10-21 17:54:49 -0500
commit7f9a8c99c93693023a96eb08afd3d9a723663279 (patch)
tree4842b94709e5ca15a4d73ca0b3da3b1ac753041a /scene
parente73ff0e961da2b57f4ff63185c0929cc222c7372 (diff)
Clean up Basis from Euler code
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/node_3d.cpp4
-rw-r--r--scene/resources/environment.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index 5f515acead..1743fa1838 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -253,9 +253,7 @@ Vector3 Node3D::get_global_rotation() const {
void Node3D::set_global_rotation(const Vector3 &p_euler_rad) {
Transform3D transform = get_global_transform();
- Basis new_basis = transform.get_basis();
- new_basis.set_euler(p_euler_rad);
- transform.set_basis(new_basis);
+ transform.basis = Basis::from_euler(p_euler_rad);
set_global_transform(transform);
}
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index ebdaaaa95f..23bd8a4be4 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -78,7 +78,7 @@ float Environment::get_sky_custom_fov() const {
void Environment::set_sky_rotation(const Vector3 &p_rotation) {
bg_sky_rotation = p_rotation;
- RS::get_singleton()->environment_set_sky_orientation(environment, Basis(p_rotation));
+ RS::get_singleton()->environment_set_sky_orientation(environment, Basis::from_euler(p_rotation));
}
Vector3 Environment::get_sky_rotation() const {