Sdk/System: Fix time loss when using max update rate
This commit is contained in:
@@ -19,7 +19,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
Ndk::NodeComponent& nodeComponent = movingEntity->GetComponent<Ndk::NodeComponent>();
|
||||
Ndk::PhysicsComponent2D& physicsComponent2D = movingEntity->AddComponent<Ndk::PhysicsComponent2D>();
|
||||
|
||||
world.GetSystem<Ndk::PhysicsSystem2D>().SetFixedUpdateRate(30.f);
|
||||
world.GetSystem<Ndk::PhysicsSystem2D>().SetMaximumUpdateRate(0.f);
|
||||
|
||||
WHEN("We update the world")
|
||||
{
|
||||
@@ -43,7 +43,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
|
||||
world.Update(1.f);
|
||||
|
||||
THEN("It should moved freely")
|
||||
THEN("It should move freely")
|
||||
{
|
||||
REQUIRE(nodeComponent.GetPosition() == position);
|
||||
movingAABB.Translate(position);
|
||||
|
||||
Reference in New Issue
Block a user