Skip to content

Commit

Permalink
[physicsbody] removed some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Jan 7, 2025
1 parent 1c8a15e commit 079848c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion runtime/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ namespace Spartan
}

// disable dirt decals since they look bad
// they are hovering over the surfaces, to avoid z-fighting, and they also cast shadows underneath them
// they are hovering over the surfaces, to avoid z-fighting, and they also cast shadows underneath them
entity->GetDescendantByName("decals_1st_floor")->SetActive(false);
entity->GetDescendantByName("decals_2nd_floor")->SetActive(false);
entity->GetDescendantByName("decals_3rd_floor")->SetActive(false);
Expand Down
8 changes: 1 addition & 7 deletions runtime/World/Components/PhysicsBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ namespace Spartan
#define rigid_body static_cast<btRigidBody*>(m_rigid_body)
#define vehicle static_cast<btRaycastVehicle*>(m_vehicle)

const float default_deactivation_time = 2000;
const float default_mass = 1.0f;
const float default_restitution = 0.2f;
const float default_friction = 1.0f;
const float default_friction_rolling = 0.0f;

btTransform compute_transform(const Vector3& position, const Quaternion& rotation, const Vector3& scale)
{
btTransform transform;
Expand Down Expand Up @@ -654,7 +648,7 @@ namespace Spartan

rigid_body->setCollisionFlags(flags);
rigid_body->forceActivationState((m_is_kinematic || m_body_type == PhysicsBodyType::Vehicle) ? DISABLE_DEACTIVATION : ISLAND_SLEEPING);
rigid_body->setDeactivationTime(default_deactivation_time);
rigid_body->setDeactivationTime(2000); // 2 seconds
}

// gravity
Expand Down

0 comments on commit 079848c

Please sign in to comment.