Merge pull request #78757 from Crimzoth/RigidBody3D-mass-issue-fix
Correctly set mass for a rigid body with custom inertia and center of mass
This commit is contained in:
commit
1e4165ac60
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@
|
|||
#include "godot_space_2d.h"
|
||||
|
||||
void GodotBody2D::_mass_properties_changed() {
|
||||
if (get_space() && !mass_properties_update_list.in_list() && (calculate_inertia || calculate_center_of_mass)) {
|
||||
if (get_space() && !mass_properties_update_list.in_list()) {
|
||||
get_space()->body_add_to_mass_properties_update_list(&mass_properties_update_list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "godot_space_3d.h"
|
||||
|
||||
void GodotBody3D::_mass_properties_changed() {
|
||||
if (get_space() && !mass_properties_update_list.in_list() && (calculate_inertia || calculate_center_of_mass)) {
|
||||
if (get_space() && !mass_properties_update_list.in_list()) {
|
||||
get_space()->body_add_to_mass_properties_update_list(&mass_properties_update_list);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue