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

@@ -995,17 +995,7 @@ void InventoryComponent::HandlePossession(Item* item) {
// Check to see if the mount is a vehicle, if so, flip it
auto* vehicleComponent = mount->GetComponent<VehiclePhysicsComponent>();
if (vehicleComponent) {
auto angles = startRotation.GetEulerAngles();
// Make it right side up
angles.x -= PI;
// Make it going in the direction of the player
angles.y -= PI;
startRotation = NiQuaternion::FromEulerAngles(angles);
mount->SetRotation(startRotation);
// We're pod racing now
characterComponent->SetIsRacing(true);
}
if (vehicleComponent) characterComponent->SetIsRacing(true);
// Setup the destroyable stats
auto* destroyableComponent = mount->GetComponent<DestroyableComponent>();