fixed unity view matrix building

This commit is contained in:
2025-03-24 06:30:09 +03:00
parent 8959161904
commit dc43411bd2
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ namespace omath::unity_engine
}
Mat4x4 CalcViewMatrix(const ViewAngles& angles, const Vector3<float>& cam_origin)
{
return MatCameraView<float, MatStoreType::ROW_MAJOR>(ForwardVector(angles), RightVector(angles),
return MatCameraView<float, MatStoreType::ROW_MAJOR>(ForwardVector(angles), -RightVector(angles),
UpVector(angles), cam_origin);
}
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,