mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 18:38:10 +00:00
Replace Quaternion with glm math (#1868)
This commit is contained in:
@@ -46,23 +46,23 @@ void AmSkullkinTower::SpawnLegs(Entity* self, const std::string& loc) {
|
||||
info.rot = newRot;
|
||||
|
||||
if (loc == "Right") {
|
||||
const auto dir = rot.GetForwardVector();
|
||||
const auto dir = QuatUtils::Forward(rot);
|
||||
pos.x += dir.x * offset;
|
||||
pos.z += dir.z * offset;
|
||||
info.pos = pos;
|
||||
} else if (loc == "Rear") {
|
||||
const auto dir = rot.GetRightVector();
|
||||
const auto dir = QuatUtils::Right(rot);
|
||||
pos.x += dir.x * offset;
|
||||
pos.z += dir.z * offset;
|
||||
info.pos = pos;
|
||||
} else if (loc == "Left") {
|
||||
const auto dir = rot.GetForwardVector() * -1;
|
||||
const auto dir = QuatUtils::Forward(rot) * -1;
|
||||
pos.x += dir.x * offset;
|
||||
pos.z += dir.z * offset;
|
||||
info.pos = pos;
|
||||
}
|
||||
|
||||
info.rot = NiQuaternion::LookAt(info.pos, self->GetPosition());
|
||||
info.rot = QuatUtils::LookAt(info.pos, self->GetPosition());
|
||||
|
||||
auto* entity = Game::entityManager->CreateEntity(info, nullptr, self);
|
||||
|
||||
|
Reference in New Issue
Block a user