NewtonCustomerSliderActuator.cpp:
- Code: Select all
void dCustomSliderActuator::SubmitAngularRow(const dMatrix& matrix0, const dMatrix& matrix1, dFloat timestep)
{
dCustomSlider::SubmitAngularRow(matrix0, matrix1, timestep);
if (m_maxForce <= 0.0f) return; //add this line![/
NewtonCustomHingeActuator.cpp:
- Code: Select all
void dCustomHingeActuator::SubmitAngularRow(const dMatrix& matrix0, const dMatrix& matrix1, const dVector& eulers, dFloat timestep)
{
dCustomHinge::SubmitAngularRow(matrix0, matrix1, eulers, timestep);
if (m_maxTorque <= 0.0f) return; //add this line!
This allows you to make a motorized joint that can go slack, or in my case we just have one hinge and one slider joint, with a command to enable or disable the motor.
I request this be added in the official source. What do you think?