Fixed moving the pivot point of rotated pieces. Fixes #179.

This commit is contained in:
Leonardo Zide 2018-01-22 17:14:38 -08:00
parent 1ee596b7fc
commit 9c503eb7a4

View file

@ -751,7 +751,7 @@ void lcPiece::MovePivotPoint(const lcVector3& Distance)
if (!IsFocused(LC_PIECE_SECTION_POSITION))
return;
mPivotMatrix.SetTranslation(mPivotMatrix.GetTranslation() + Distance);
mPivotMatrix.SetTranslation(mPivotMatrix.GetTranslation() + lcMul30(Distance, lcMatrix44AffineInverse(mModelWorld)));
mState |= LC_PIECE_PIVOT_POINT_VALID;
}