diff options
author | JohnM666 <zhekamol@gmail.com> | 2021-05-19 23:16:49 +0300 |
---|---|---|
committer | JohnM <zhekamol@gmail.com> | 2021-05-20 10:46:24 +0300 |
commit | b19544e91d054c13597e3820dd05311e1852b30c (patch) | |
tree | f9e5c30ff2eb8f80b2dda35937246598c514b3c0 /scene | |
parent | 57927bd56b1e5e4e09abe8c66af754fda269e9bd (diff) |
Fix #46282 Executing RigidBody3D.get_inverse_inertia_tensor() crashes Godot
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index dd1a797568..1e1ff8320d 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -511,7 +511,7 @@ Vector3 RigidBody3D::get_angular_velocity() const { return angular_velocity; } -Basis RigidBody3D::get_inverse_inertia_tensor() { +Basis RigidBody3D::get_inverse_inertia_tensor() const { return inverse_inertia_tensor; } diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index 21afe66861..0f2e829750 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -181,7 +181,7 @@ public: void set_angular_velocity(const Vector3 &p_velocity); Vector3 get_angular_velocity() const override; - Basis get_inverse_inertia_tensor(); + Basis get_inverse_inertia_tensor() const; void set_gravity_scale(real_t p_gravity_scale); real_t get_gravity_scale() const; |