mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 09:54:14 +02:00
minor optimization of MuscleConstraint::enforce()
This commit is contained in:
parent
3305f5edf9
commit
374e89817b
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ MuscleConstraint::MuscleConstraint(VerletPoint* parent, VerletPoint* child) : _r
|
|||
}
|
||||
|
||||
float MuscleConstraint::enforce() {
|
||||
_childPoint->_position = (1.0f - _strength) * _childPoint->_position + _strength * (_rootPoint->_position + _childOffset);
|
||||
_childPoint->_position += _strength * (_rootPoint->_position + _childOffset - _childPoint->_position);
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue