diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-07 14:21:31 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-07 14:21:31 +0100 |
commit | e7423549a26c0df6db930329e2c4067b1c6777b7 (patch) | |
tree | 0de96a7b935fead6cc9b5d04d09d713047372b1f /src/test/PhysicsTest.cpp | |
parent | f3009ab8f0785a54d3fd83c0d758c8ebd901adda (diff) | |
parent | fdb4c99e139a264d4e15e6913a3756fc6cccb2f2 (diff) |
merge with master
Diffstat (limited to 'src/test/PhysicsTest.cpp')
-rw-r--r-- | src/test/PhysicsTest.cpp | 10 |
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(); |