fix MDL_USEROTATIONCENTER
This commit is contained in:
parent
4bdc3ee28d
commit
7f031ab2cc
1 changed files with 4 additions and 4 deletions
|
|
@ -200,7 +200,7 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr
|
|||
// 1) Applying actor angle, pitch and roll to the model
|
||||
if (flags & MDL_USEROTATIONCENTER)
|
||||
{
|
||||
objectToWorldMatrix.translate(rotationCenterX, rotationCenterY/stretch, rotationCenterZ);
|
||||
objectToWorldMatrix.translate(rotationCenterX, rotationCenterZ/stretch, rotationCenterY);
|
||||
|
||||
objectToWorldMatrix.rotate(-rotation.Yaw.Degrees(), 0, 1, 0);
|
||||
objectToWorldMatrix.rotate(rotation.Pitch.Degrees(), 0, 0, 1);
|
||||
|
|
@ -213,7 +213,7 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr
|
|||
objectToWorldMatrix.rotate(rotateOffset, xrotate, yrotate, zrotate);
|
||||
}
|
||||
|
||||
objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterY/stretch, -rotationCenterZ);
|
||||
objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterZ/stretch, -rotationCenterY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -226,9 +226,9 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr
|
|||
// The rotation angle is based on the elapsed time.
|
||||
if(flags & MDL_ROTATING)
|
||||
{
|
||||
objectToWorldMatrix.translate(rotationCenterX, rotationCenterY/stretch, rotationCenterZ);
|
||||
objectToWorldMatrix.translate(rotationCenterX, rotationCenterZ/stretch, rotationCenterY);
|
||||
objectToWorldMatrix.rotate(rotateOffset, xrotate, yrotate, zrotate);
|
||||
objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterY/stretch, -rotationCenterZ);
|
||||
objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterZ/stretch, -rotationCenterY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue