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

@@ -36,7 +36,7 @@ void AgSpiderBossMessage::OnCollisionPhantom(Entity* self, Entity* target) {
auto box = GetBox(self);
// knockback the target
auto forward = self->GetRotation().GetForwardVector();
auto forward = QuatUtils::Forward(self->GetRotation());
box.boxTarget = target->GetObjectID();
GameMessages::SendPlayFXEffect(target->GetObjectID(), 1378, u"create", "pushBack");
RenderComponent::PlayAnimation(target, "knockback-recovery");

View File

@@ -10,8 +10,8 @@ void GfBanana::SpawnBanana(Entity* self) {
const auto rotation = self->GetRotation();
position.y += 12;
position.x -= rotation.GetRightVector().x * 5;
position.z -= rotation.GetRightVector().z * 5;
position.x -= QuatUtils::Right(rotation).x * 5;
position.z -= QuatUtils::Right(rotation).z * 5;
EntityInfo info{};

View File

@@ -22,7 +22,7 @@ struct SGEnemy {
struct SGConstants {
Vector3 playerStartPosition;
Quaternion playerStartRotation;
Quaternion playerStartRotation = QuatUtils::IDENTITY;
LOT cannonLot;
uint32_t impactSkillID;
LOT projectileLot;

View File

@@ -273,7 +273,7 @@ void NsConcertInstrument::RepositionPlayer(Entity* self, Entity* player) {
case Keyboard:
position.SetX(position.GetX() - 0.45f);
position.SetZ(position.GetZ() + 0.75f);
rotation = NiQuaternion::CreateFromAxisAngle(position, -0.8f); // Slight rotation to make the animation sensible
rotation = QuatUtils::AxisAngle(position, -0.8f); // Slight rotation to make the animation sensible
break;
case Drum:
position.SetZ(position.GetZ() - 0.5f);