From b2bd9f4e5109aa8112793b103228632a0e563d65 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Tue, 1 Jun 2021 19:11:56 -0700 Subject: Safe margin cleanup Safe margin property on CharacterBody only, used as argument in move_and_collide. Removed kinematic_safe_margin in 3D physics server, not really useful and now harmonized with 2D. --- servers/physics_2d/physics_server_2d_sw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'servers/physics_2d') diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h index f1eb78a776..5002bf5fc8 100644 --- a/servers/physics_2d/physics_server_2d_sw.h +++ b/servers/physics_2d/physics_server_2d_sw.h @@ -247,8 +247,8 @@ public: virtual void body_set_pickable(RID p_body, bool p_pickable) override; - virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override; - virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override; + virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.08, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override; + virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.08) override; // this function only works on physics process, errors and returns null otherwise virtual PhysicsDirectBodyState2D *body_get_direct_state(RID p_body) override; -- cgit v1.2.3