summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorShyRed <ShyRed@users.noreply.github.com>2019-03-27 19:21:07 +0100
committerShyRed <ShyRed@users.noreply.github.com>2019-03-27 19:21:07 +0100
commit96093778ed864f6bcc1e924261ad3149ab18110b (patch)
tree9f53ad32cf8ef56a68e32042352c54eb2c513494 /servers
parent174b19f768f50c7078ba49dcdf85d9d85ac4e875 (diff)
Remove hardcoded joint bias
Use user provided bias instead of hardcoded bias.
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 5c2242c4c5..954b0fa3ea 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -299,9 +299,7 @@ bool GrooveJoint2DSW::setup(real_t p_step) {
Vector2 delta = (B->get_transform().get_origin() + rB) - (A->get_transform().get_origin() + rA);
- // FIXME: We used to do this assignment and then override it with 0.001 right after. Investigate why.
- //real_t _b = get_bias();
- real_t _b = 0.001;
+ real_t _b = get_bias();
gbias = (delta * -(_b == 0 ? space->get_constraint_bias() : _b) * (1.0 / p_step)).clamped(get_max_bias());
// apply accumulated impulse