diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-10-03 03:42:17 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-10-03 14:40:47 +0200 |
commit | 1d09c27ba4b94e677b66d8d2c2b9e38f7829ad38 (patch) | |
tree | 351b7c0487f33970445104992aaa4dd80f486e34 /servers/physics_2d | |
parent | 78d97b060a6873a454e710380cb9ef1bde5e4c65 (diff) |
Expose more 2D/3D physics options in project settings
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 16 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.h | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index d0dcee7763..8347ccd3b1 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -1321,14 +1321,14 @@ Space2DSW::Space2DSW() { contact_debug_count=0; locked=false; - contact_recycle_radius=0.01; - contact_max_separation=0.05; - contact_max_allowed_penetration= 0.01; - - constraint_bias = 0.01; - body_linear_velocity_sleep_treshold=0.01; - body_angular_velocity_sleep_treshold=(8.0 / 180.0 * Math_PI); - body_time_to_sleep=0.5; + contact_recycle_radius=1.0; + contact_max_separation=1.5; + contact_max_allowed_penetration= 0.3; + + constraint_bias = 0.2; + body_linear_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threashold_linear",2.0); + body_angular_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threshold_angular",(8.0 / 180.0 * Math_PI)); + body_time_to_sleep=GLOBAL_DEF("physics_2d/time_before_sleep",0.5); broadphase = BroadPhase2DSW::create_func(); diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h index f58e8c3fe7..45a3e4ca8f 100644 --- a/servers/physics_2d/space_2d_sw.h +++ b/servers/physics_2d/space_2d_sw.h @@ -37,6 +37,7 @@ #include "area_pair_2d_sw.h" #include "broad_phase_2d_sw.h" #include "collision_object_2d_sw.h" +#include "globals.h" class Physics2DDirectSpaceStateSW : public Physics2DDirectSpaceState { |