Implemented a custom physics engine #316

Merged
direnbharwani merged 95 commits from SHPhysics into main 2023-01-23 15:55:45 +08:00
3 changed files with 3 additions and 2 deletions
Showing only changes of commit 92ed8a29ff - Show all commits

View File

@ -72,7 +72,7 @@
RigidBody Component:
Type: Static
Auto Mass: false
Mass: 1
Mass: .inf
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: false

View File

@ -319,6 +319,7 @@ namespace SHADE
{
if (bodyType != Type::DYNAMIC)
{
invMass = 0.0f;
SHLOG_WARNING("Cannot set mass of a non-Dynamic Body {}", entityID)
return;
}

View File

@ -20,7 +20,7 @@ namespace SHADE
/*-----------------------------------------------------------------------------------*/
SHRigidBodyComponent::SHRigidBodyComponent() noexcept
: type { Type::STATIC }
: type { Type::DYNAMIC }
, interpolate { true }
, rigidBody { nullptr }
{}