mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 15:03:27 +00:00
fixed gimba lock for opengl camera
This commit is contained in:
@@ -32,9 +32,9 @@ namespace omath::opengl_engine
|
||||
}
|
||||
Mat4x4 RotationMatrix(const ViewAngles& angles)
|
||||
{
|
||||
return MatRotationAxisZ<float, MatStoreType::COLUMN_MAJOR>(angles.roll) *
|
||||
return MatRotationAxisX<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch) *
|
||||
MatRotationAxisY<float, MatStoreType::COLUMN_MAJOR>(-angles.yaw) *
|
||||
MatRotationAxisX<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch);
|
||||
MatRotationAxisZ<float, MatStoreType::COLUMN_MAJOR>(angles.roll);
|
||||
}
|
||||
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
|
||||
const float far)
|
||||
|
||||
Reference in New Issue
Block a user