JoltPhysics3D: Add elapsedTime parameter to PostSimulate

This commit is contained in:
SirLynix
2023-12-07 16:45:46 +01:00
parent 6cbfb01243
commit 26dbdef50d
5 changed files with 8 additions and 8 deletions

View File

@@ -197,10 +197,10 @@ namespace Nz
m_collider.reset();
}
void JoltCharacter::PostSimulate()
void JoltCharacter::PostSimulate(float elapsedTime)
{
m_character->PostSimulation(0.05f);
m_impl->PostSimulate(*this);
m_impl->PostSimulate(*this, elapsedTime);
}
void JoltCharacter::PreSimulate(float elapsedTime)
@@ -211,7 +211,7 @@ namespace Nz
JoltCharacterImpl::~JoltCharacterImpl() = default;
void JoltCharacterImpl::PostSimulate(JoltCharacter& /*character*/)
void JoltCharacterImpl::PostSimulate(JoltCharacter& /*character*/, float /*elapsedTime*/)
{
}

View File

@@ -473,7 +473,7 @@ namespace Nz
m_world->physicsSystem.Update(stepSize, 1, &m_world->tempAllocator, &jobSystem);
for (JoltPhysicsStepListener* stepListener : m_stepListeners)
stepListener->PostSimulate();
stepListener->PostSimulate(stepSize);
m_timestepAccumulator -= m_stepSize;
stepCount++;

View File

@@ -9,7 +9,7 @@ namespace Nz
{
JoltPhysicsStepListener::~JoltPhysicsStepListener() = default;
void JoltPhysicsStepListener::PostSimulate()
void JoltPhysicsStepListener::PostSimulate(float /*elapsedTime*/)
{
}