Skip to content

Commit

Permalink
UPBGE: Fix KX_ObjectActuator.torque value affected by servo control.
Browse files Browse the repository at this point in the history
This doesn't change the behaviour of the servo control.
  • Loading branch information
panzergame committed Nov 13, 2017
1 parent 0a8ea4d commit d45086e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gameengine/Ketsji/KX_ObjectActuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ bool KX_ObjectActuator::Update()
MT_Vector3 dv = e - m_previous_error;
MT_Vector3 I = m_error_accumulator + e;

MT_Vector3& f = (m_bitLocalFlag.ServoControlAngular) ? m_force : m_torque;
MT_Vector3& f = (m_bitLocalFlag.ServoControlAngular) ? m_torque : m_force;
f = m_pid.x() * e + m_pid.y() * I + m_pid.z() * dv;

/* Make sure velocity is correct depending on how body react to force/torque.
Expand Down

0 comments on commit d45086e

Please sign in to comment.