Replace Quaternion with glm math (#1868)

This commit is contained in:
David Markowitz
2025-09-06 19:18:03 -07:00
committed by GitHub
parent 8198ad70f6
commit f6c13d9ee6
77 changed files with 197 additions and 406 deletions

View File

@@ -83,7 +83,7 @@ void MovementAIComponent::Resume() {
m_Paused = false;
SetVelocity(m_SavedVelocity);
m_SavedVelocity = NiPoint3Constant::ZERO;
SetRotation(NiQuaternion::LookAt(m_Parent->GetPosition(), m_NextWaypoint));
SetRotation(QuatUtils::LookAt(m_Parent->GetPosition(), m_NextWaypoint));
Game::entityManager->SerializeEntity(m_Parent);
}
@@ -154,7 +154,7 @@ void MovementAIComponent::Update(const float deltaTime) {
m_TimeTravelled = 0.0f;
m_TimeToTravel = length / speed;
SetRotation(NiQuaternion::LookAt(source, m_NextWaypoint));
SetRotation(QuatUtils::LookAt(source, m_NextWaypoint));
}
} else {
// Check if there are more waypoints in the queue, if so set our next destination to the next waypoint