fix: remove scene view orbit roll
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <XCEngine/Components/TransformComponent.h>
|
||||
#include <XCEngine/Core/Math/Math.h>
|
||||
#include <XCEngine/Core/Math/Quaternion.h>
|
||||
#include <XCEngine/Core/Math/Vector3.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -94,7 +95,10 @@ public:
|
||||
|
||||
void ApplyTo(Components::TransformComponent& transform) const {
|
||||
transform.SetPosition(GetPosition());
|
||||
transform.LookAt(m_focalPoint);
|
||||
transform.SetRotation(Math::Quaternion::FromEulerAngles(
|
||||
-m_pitchDegrees * Math::DEG_TO_RAD,
|
||||
m_yawDegrees * Math::DEG_TO_RAD,
|
||||
0.0f));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user