diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp index 9dc4a6f8..82ba5def 100644 --- a/Code/Game/GameLogic/Level.cpp +++ b/Code/Game/GameLogic/Level.cpp @@ -55,7 +55,7 @@ void Level::InitiateLevel(float radius) sbDesc.centerPosition = Oyster::Math::Float4(0,0,0,1); sbDesc.ignoreGravity = true; sbDesc.radius = 600; - sbDesc.mass = 100; + sbDesc.mass = 70; sbDesc.frictionCoeff_Static = 0; sbDesc.frictionCoeff_Dynamic = 0; //sbDesc.rotation = @@ -75,8 +75,9 @@ void Level::InitiateLevel(float radius) sbDesc_TestBox.centerPosition = Oyster::Math::Float4(10,320,0,1); sbDesc_TestBox.ignoreGravity = false; - sbDesc_TestBox.mass = 20; - sbDesc_TestBox.size = Oyster::Math::Float4(0.5,0.5,0.5,0); + sbDesc_TestBox.mass = 15; + sbDesc_TestBox.size = Oyster::Math::Float4(1, 1, 1, 0); + sbDesc_TestBox.inertiaTensor.Cuboid(15, 1, 1, 1); ICustomBody* rigidBody_TestBox; @@ -131,8 +132,9 @@ void Level::InitiateLevel(float radius) API::SimpleBodyDescription sbDesc_Crystal; sbDesc_Crystal.centerPosition = Oyster::Math::Float4(10, 605, 0, 1); sbDesc_Crystal.ignoreGravity = false; - sbDesc_Crystal.mass = 80; - sbDesc_Crystal.size = Oyster::Math::Float3(1,2,1); + sbDesc_Crystal.mass = 15; + sbDesc_Crystal.size = Oyster::Math::Float3(1, 2, 1); + sbDesc_Crystal.inertiaTensor.Cuboid(15, 1, 2, 1); ICustomBody* rigidBody_Crystal = API::Instance().CreateRigidBody(sbDesc_Crystal).Release(); rigidBody_Crystal->SetSubscription(Level::PhysicsOnMoveLevel); diff --git a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index a59c03b1..81a9ac06 100644 --- a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -362,7 +362,7 @@ void API_Impl::Update() } Float posLength = state.GetCenterPosition().GetLength(); - if( gravityImpulse != Float4::null && posLength - 601 > state.GetReach().GetLength() ) + if( gravityImpulse != Float4::null && posLength - 600 > state.GetReach().GetLength() ) { state.ApplyLinearImpulse( gravityImpulse.xyz ); state.SetGravityNormal( gravityImpulse.GetNormalized().xyz );