Skip to content

Commit

Permalink
UPBGE: Fix cone constraint debug draw.
Browse files Browse the repository at this point in the history
Previously the limits of cone constraint were set to maximumn value
when the value gave by the user was negative. This caused to have
a difference between min and max angle out of range for float and then
created incorrect behaviour while drawing the constraint as it intented
to draw a billion of lines.
This issue is fixed by keeping the user inputs as for other constraints.
  • Loading branch information
panzergame committed Aug 29, 2017
1 parent 0164085 commit 2e39bcc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/gameengine/Physics/Bullet/CcdConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ void CcdConstraint::SetParam(int param, float value0, float value1)
{
//param = 3,4,5 are constraint limits, high limit values
btConeTwistConstraint *coneTwist = (btConeTwistConstraint *)m_constraint;
if (value1 < 0.0f)
coneTwist->setLimit(param, btScalar(BT_LARGE_FLOAT));
else
coneTwist->setLimit(param, value1);
coneTwist->setLimit(param, value1);
break;
}
default:
Expand Down

0 comments on commit 2e39bcc

Please sign in to comment.