aboutsummaryrefslogtreecommitdiff
path: root/servers/physics/body_sw.cpp
diff options
context:
space:
mode:
authorAndreaCatania2017-11-07 15:22:09 +0100
committerAndreaCatania2017-11-07 15:22:09 +0100
commit10f879bf883ed364a9b0eafe40aba03c59b6fbfb (patch)
tree12965784f364d986bcc226565c4e96d7405fb62c /servers/physics/body_sw.cpp
parent9a78efc7c270211e49fd7b2f071b61c706febffc (diff)
downloadgodot-10f879bf883ed364a9b0eafe40aba03c59b6fbfb.tar.gz
godot-10f879bf883ed364a9b0eafe40aba03c59b6fbfb.tar.zst
godot-10f879bf883ed364a9b0eafe40aba03c59b6fbfb.zip
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 6ced00411..f8cd6ca85 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;