fix: remove hardcoded rotations now that vehicles orient correctly (#1132)

This commit is contained in:
Aaron Kimbrell
2023-07-03 11:58:49 -05:00
committed by GitHub
parent 5cc7479f29
commit 9375c36c7b
2 changed files with 1 additions and 23 deletions

View File

@@ -1267,18 +1267,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
return;
}
auto vehiclePhysicsComponent = newEntity->GetComponent<VehiclePhysicsComponent>();
if (vehiclePhysicsComponent) {
auto newRot = newEntity->GetRotation();
auto angles = newRot.GetEulerAngles();
// make it right side up
angles.x -= PI;
// make it going in the direction of the player
angles.y -= PI;
newRot = NiQuaternion::FromEulerAngles(angles);
newEntity->SetRotation(newRot);
}
EntityManager::Instance()->ConstructEntity(newEntity);
}