diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-07-14 10:19:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-07-14 10:19:58 -0300 |
commit | 13e0385702c9b5d152f2781ff566e07db9aeddc3 (patch) | |
tree | 8251b19852ea8cb2cc0a471ac16e503aaa02d10e /scene/3d | |
parent | 2921827387b339fef98cb761f9571dd0f1dd1986 (diff) | |
download | redot-engine-13e0385702c9b5d152f2781ff566e07db9aeddc3.tar.gz |
Properly pass safe margin on initialization.
Fixes jitter.
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 2 |
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"); } |