aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/PhysicsSystem.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-03 19:32:15 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-03 19:32:15 +0100
commitff618da3f97237796042fa3664da59ed147bc1da (patch)
treecfc283425f145b16a2b2e3b1a0a5760e8015a2b1 /src/crepe/system/PhysicsSystem.cpp
parentfb018cd8511e9cae408f8ea7d2b73e66a452625b (diff)
improved comments
Diffstat (limited to 'src/crepe/system/PhysicsSystem.cpp')
-rw-r--r--src/crepe/system/PhysicsSystem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/system/PhysicsSystem.cpp b/src/crepe/system/PhysicsSystem.cpp
index 8f21727..f3833cb 100644
--- a/src/crepe/system/PhysicsSystem.cpp
+++ b/src/crepe/system/PhysicsSystem.cpp
@@ -31,11 +31,11 @@ void PhysicsSystem::update() {
* gravity);
}
// Add damping
- if (rigidbody.data.angular_velocity_factor != 1 && rigidbody.data.angular_velocity_factor > 0) {
- rigidbody.data.angular_velocity *= rigidbody.data.angular_velocity_factor;
+ if (rigidbody.data.angular_velocity_coefficient != 1 && rigidbody.data.angular_velocity_coefficient > 0) {
+ rigidbody.data.angular_velocity *= rigidbody.data.angular_velocity_coefficient;
}
- if (rigidbody.data.linear_velocity_factor != vec2{1, 1} && rigidbody.data.linear_velocity_factor.x > 0 && rigidbody.data.linear_velocity_factor.y > 0) {
- rigidbody.data.linear_velocity *= rigidbody.data.linear_velocity_factor;
+ if (rigidbody.data.linear_velocity_coefficient != vec2{1, 1} && rigidbody.data.linear_velocity_coefficient.x > 0 && rigidbody.data.linear_velocity_coefficient.y > 0) {
+ rigidbody.data.linear_velocity *= rigidbody.data.linear_velocity_coefficient;
}
// Max velocity check