diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-09 16:08:58 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 16:08:58 -0300 |
commit | 50a9bd4e23e62579e2249de3c27624d6c56df1d0 (patch) | |
tree | a0595c5872054a9d4fe50bc5446cea5518b5f8b0 /scene | |
parent | 881defa209435816f52b08edfd876159592e830a (diff) | |
parent | 10f879bf883ed364a9b0eafe40aba03c59b6fbfb (diff) |
Merge pull request #12713 from AndreaCatania/master
Rewritten kinematic system
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/physics_body.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 4c661e6a88..df137f1908 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -938,7 +938,7 @@ bool KinematicBody::move_and_collide(const Vector3 &p_motion, Collision &r_colli Transform gt = get_global_transform(); PhysicsServer::MotionResult result; - bool colliding = PhysicsServer::get_singleton()->body_test_motion(get_rid(), gt, p_motion, margin, &result); + bool colliding = PhysicsServer::get_singleton()->body_test_motion(get_rid(), gt, p_motion, &result); if (colliding) { r_collision.collider_metadata = result.collider_metadata; @@ -1041,12 +1041,13 @@ bool KinematicBody::test_move(const Transform &p_from, const Vector3 &p_motion) ERR_FAIL_COND_V(!is_inside_tree(), false); - return PhysicsServer::get_singleton()->body_test_motion(get_rid(), p_from, p_motion, margin); + return PhysicsServer::get_singleton()->body_test_motion(get_rid(), p_from, p_motion); } void KinematicBody::set_safe_margin(float p_margin) { margin = p_margin; + PhysicsServer::get_singleton()->body_set_kinematic_safe_margin(get_rid(), margin); } float KinematicBody::get_safe_margin() const { |