aboutsummaryrefslogtreecommitdiff
path: root/src/test/PhysicsTest.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-02 20:34:00 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-02 20:34:00 +0100
commit4bbc27098d5a8907ab0500ad3ccc82283cf95ddf (patch)
treefaf484ea45c432d8a1e22bc51a73325a80766e97 /src/test/PhysicsTest.cpp
parenteeb66130e2cb94c94e1748576f98f78ce0f1ee86 (diff)
merge fix and review fix
Diffstat (limited to 'src/test/PhysicsTest.cpp')
-rw-r--r--src/test/PhysicsTest.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/PhysicsTest.cpp b/src/test/PhysicsTest.cpp
index 33b6020..5dd448f 100644
--- a/src/test/PhysicsTest.cpp
+++ b/src/test/PhysicsTest.cpp
@@ -28,8 +28,6 @@ public:
.max_linear_velocity = vec2{10, 10},
.max_angular_velocity = 10,
.constraints = {0, 0},
- .use_gravity = true,
- .bounce = false,
});
}
transforms = mgr.get_components_by_id<Transform>(0);
@@ -105,16 +103,16 @@ TEST_F(PhysicsTest, movement) {
EXPECT_EQ(transform.position.y, 1);
EXPECT_EQ(transform.rotation, 1);
- rigidbody.data.linear_damping.x = 0.5;
- rigidbody.data.linear_damping.y = 0.5;
- rigidbody.data.angular_damping = 0.5;
+ rigidbody.data.linear_velocity_factor.x = 0.5;
+ rigidbody.data.linear_velocity_factor.y = 0.5;
+ rigidbody.data.angular_velocity_factor = 0.5;
system.update();
EXPECT_EQ(rigidbody.data.linear_velocity.x, 0.5);
EXPECT_EQ(rigidbody.data.linear_velocity.y, 0.5);
EXPECT_EQ(rigidbody.data.angular_velocity, 0.5);
rigidbody.data.constraints = {1, 1, 0};
- rigidbody.data.angular_damping = 0;
+ rigidbody.data.angular_velocity_factor = 0;
rigidbody.data.max_angular_velocity = 1000;
rigidbody.data.angular_velocity = 360;
system.update();