+90 up -90 down fix for camera view angles

This commit is contained in:
2026-04-23 02:05:54 +03:00
parent 27cb511510
commit 3eb9daf10b
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ namespace omath::unreal_engine
{
const auto direction = (look_at - cam_origin).normalized();
return {PitchAngle::from_radians(-std::asin(direction.z)),
return {PitchAngle::from_radians(std::asin(direction.z)),
YawAngle::from_radians(std::atan2(direction.y, direction.x)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept