feat: gravite dans toutes les directions

This commit is contained in:
StratiX0
2024-04-09 12:52:32 +02:00
parent ebccd2cf68
commit 56ed2d1d5f
3 changed files with 9 additions and 11 deletions

View File

@@ -740,7 +740,7 @@ bool ApplicationClass::Frame(InputClass* Input)
object->SetPosition(XMVectorSetY(currentPosition, 20.0f)); // Define the new position of the object
}
m_Physics->ApplyGravity(object, frameTime);
m_Physics->ApplyDrag(object, 0.1f, frameTime);
m_Physics->ApplyDrag(object, 1.0f, frameTime);
// Update object position based on its velocity
XMVECTOR position = object->GetPosition();
XMVECTOR velocity = object->GetVelocity();