diff options
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/api/Rigidbody.h | 4 | ||||
-rw-r--r-- | src/crepe/system/PhysicsSystem.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h index 9cdf3f5..14b183b 100644 --- a/src/crepe/api/Rigidbody.h +++ b/src/crepe/api/Rigidbody.h @@ -109,8 +109,8 @@ public: * * \{ */ - //! Angular velocity of the object, representing the rate of rotation (in radians per second). - float angular_velocity = 1; + //! Angular velocity of the object, representing the rate of rotation (in degrees). + float angular_velocity = 0; //! Maximum angular velocity of the object. This limits the maximum rate of rotation. float max_angular_velocity = INFINITY; //! Angular velocity coefficient. This scales the object's angular velocity, typically used for damping. diff --git a/src/crepe/system/PhysicsSystem.cpp b/src/crepe/system/PhysicsSystem.cpp index f3833cb..b5da042 100644 --- a/src/crepe/system/PhysicsSystem.cpp +++ b/src/crepe/system/PhysicsSystem.cpp @@ -31,10 +31,10 @@ void PhysicsSystem::update() { * gravity); } // Add damping - if (rigidbody.data.angular_velocity_coefficient != 1 && rigidbody.data.angular_velocity_coefficient > 0) { + if (rigidbody.data.angular_velocity_coefficient > 0) { rigidbody.data.angular_velocity *= rigidbody.data.angular_velocity_coefficient; } - if (rigidbody.data.linear_velocity_coefficient != vec2{1, 1} && rigidbody.data.linear_velocity_coefficient.x > 0 && rigidbody.data.linear_velocity_coefficient.y > 0) { + if (rigidbody.data.linear_velocity_coefficient.x > 0 && rigidbody.data.linear_velocity_coefficient.y > 0) { rigidbody.data.linear_velocity *= rigidbody.data.linear_velocity_coefficient; } |