summaryrefslogtreecommitdiffstats
path: root/modules/bullet/godot_ray_world_algorithm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/godot_ray_world_algorithm.cpp')
-rw-r--r--modules/bullet/godot_ray_world_algorithm.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/bullet/godot_ray_world_algorithm.cpp b/modules/bullet/godot_ray_world_algorithm.cpp
index 449f625e17..3e06239453 100644
--- a/modules/bullet/godot_ray_world_algorithm.cpp
+++ b/modules/bullet/godot_ray_world_algorithm.cpp
@@ -35,8 +35,6 @@
#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
-#define RAY_STABILITY_MARGIN 0.1
-
/**
@author AndreaCatania
*/
@@ -102,7 +100,7 @@ void GodotRayWorldAlgorithm::processCollision(const btCollisionObjectWrapper *bo
btScalar depth(ray_shape->getScaledLength() * (btResult.m_closestHitFraction - 1));
- if (depth >= -RAY_STABILITY_MARGIN)
+ if (depth >= -ray_shape->getMargin() * 0.5)
depth = 0;
if (ray_shape->getSlipsOnSlope())