summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-14 19:36:51 +0200
committerGitHub <noreply@github.com>2020-07-14 19:36:51 +0200
commit9d9716992892a2eb796bac856920d354e3243099 (patch)
tree5990a276f06b6a8026609dc2fa710c481dfa96e2 /scene
parent28d83ecf5ad000214a1875c5d30ff8da769db9e8 (diff)
parent13e0385702c9b5d152f2781ff566e07db9aeddc3 (diff)
Merge pull request #40377 from reduz/fix-default-kb3d-safe-margin
Properly pass safe margin on initialization.
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/physics_body_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index fda072e233..72ae75b236 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -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");
}