aboutsummaryrefslogtreecommitdiff
path: root/src/test/PhysicsTest.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-07 14:53:01 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-07 14:53:01 +0100
commit5c3ce63558f2d5dec06a124773f910d783bb22aa (patch)
tree77402408eaba5dab3fb5064628dad1a5fd2be0f1 /src/test/PhysicsTest.cpp
parent1e9e564f3806d07c7b0dc445c4ae2e738350fc83 (diff)
parentfdb4c99e139a264d4e15e6913a3756fc6cccb2f2 (diff)
merge master
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 43af8e4..43d2931 100644
--- a/src/test/PhysicsTest.cpp
+++ b/src/test/PhysicsTest.cpp
@@ -30,8 +30,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);
@@ -107,16 +105,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_coefficient.x = 0.5;
+ rigidbody.data.linear_velocity_coefficient.y = 0.5;
+ rigidbody.data.angular_velocity_coefficient = 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_coefficient = 0;
rigidbody.data.max_angular_velocity = 1000;
rigidbody.data.angular_velocity = 360;
system.update();