summaryrefslogtreecommitdiff
path: root/servers/physics/body_sw.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-09 16:08:58 -0300
committerGitHub <noreply@github.com>2017-11-09 16:08:58 -0300
commit50a9bd4e23e62579e2249de3c27624d6c56df1d0 (patch)
treea0595c5872054a9d4fe50bc5446cea5518b5f8b0 /servers/physics/body_sw.cpp
parent881defa209435816f52b08edfd876159592e830a (diff)
parent10f879bf883ed364a9b0eafe40aba03c59b6fbfb (diff)
Merge pull request #12713 from AndreaCatania/master
Rewritten kinematic system
Diffstat (limited to 'servers/physics/body_sw.cpp')
-rw-r--r--servers/physics/body_sw.cpp5
1 files changed, 5 insertions, 0 deletions
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;