From 10f879bf883ed364a9b0eafe40aba03c59b6fbfb Mon Sep 17 00:00:00 2001 From: AndreaCatania Date: Tue, 7 Nov 2017 15:22:09 +0100 Subject: Rewritten kinematic system --- servers/physics/body_sw.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'servers/physics/body_sw.cpp') diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index 6ced004118..f8cd6ca858 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -736,6 +736,10 @@ void BodySW::set_force_integration_callback(ObjectID p_id, const StringName &p_m } } +void BodySW::set_kinematic_margin(real_t p_margin) { + kinematic_safe_margin = p_margin; +} + BodySW::BodySW() : CollisionObjectSW(TYPE_BODY), active_list(this), inertia_update_list(this), direct_state_query_list(this) { @@ -743,6 +747,7 @@ BodySW::BodySW() active = true; mass = 1; + kinematic_safe_margin = 0.01; //_inv_inertia=Transform(); _inv_mass = 1; bounce = 0; -- cgit v1.2.3