summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreaCatania <info@andreacatania.com>2017-12-09 15:26:19 +0100
committerAndreaCatania <info@andreacatania.com>2017-12-09 15:26:19 +0100
commit5e10f8052248858c56faf9f0fc5c25574cad9431 (patch)
tree2eb8d83259a8c2da790e067185f65ec9a3ae3bcf
parent0ea1c3bd538a702cacd8b6dfa473fb2e07ba9837 (diff)
Makes consistent Slider joint Gizmo
-rw-r--r--editor/spatial_editor_gizmos.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 954f804577..c44e78a621 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -2943,10 +2943,10 @@ void SliderJointSpatialGizmo::redraw() {
float ll = p3d->get_param(SliderJoint::PARAM_ANGULAR_LIMIT_LOWER);
float ul = p3d->get_param(SliderJoint::PARAM_ANGULAR_LIMIT_UPPER);
- float lll = -p3d->get_param(SliderJoint::PARAM_LINEAR_LIMIT_LOWER);
- float lul = -p3d->get_param(SliderJoint::PARAM_LINEAR_LIMIT_UPPER);
+ float lll = p3d->get_param(SliderJoint::PARAM_LINEAR_LIMIT_LOWER);
+ float lul = p3d->get_param(SliderJoint::PARAM_LINEAR_LIMIT_UPPER);
- if (lll > lul) {
+ if (lll <= lul) {
cursor_points.push_back(Vector3(lul, 0, 0));
cursor_points.push_back(Vector3(lll, 0, 0));