Skip to content

Commit

Permalink
Merge pull request #40377 from reduz/fix-default-kb3d-safe-margin
Browse files Browse the repository at this point in the history
Properly pass safe margin on initialization.
  • Loading branch information
akien-mga authored Jul 14, 2020
2 parents 28d83ec + 13e0385 commit 9d97169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scene/3d/physics_body_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,12 +1241,12 @@ void KinematicBody3D::_direct_state_changed(Object *p_state) {

KinematicBody3D::KinematicBody3D() :
PhysicsBody3D(PhysicsServer3D::BODY_MODE_KINEMATIC) {
margin = 0.001;
locked_axis = 0;
on_floor = false;
on_ceiling = false;
on_wall = false;

set_safe_margin(0.001);
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
}

Expand Down
2 changes: 1 addition & 1 deletion servers/physics_3d/body_3d_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ Body3DSW::Body3DSW() :
active = true;

mass = 1;
kinematic_safe_margin = 0.01;
kinematic_safe_margin = 0.001;
//_inv_inertia=Transform();
_inv_mass = 1;
bounce = 0;
Expand Down

0 comments on commit 9d97169

Please sign in to comment.