diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-06 09:24:20 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-06 09:24:20 +0100 |
commit | 5835e478ff8c9417b5b12c8fe2e21cc0311991be (patch) | |
tree | b89c3924637dbb5c1bcb761d501f13f2ee6a8750 /src/test/PhysicsTest.cpp | |
parent | 9cd9e3674d8b1c326c81b7896b9254408fb19972 (diff) | |
parent | 453aeafda1503aeafa54b8f6e293936c1a3db5ea (diff) |
Merge branch 'jaro/collision-system' of github.com:lonkaars/crepe into max/AI
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(); |