update vertical damping & add rigidbody:get_vdamping

This commit is contained in:
MihailRis
2025-09-07 17:10:13 +03:00
parent 67a5741ed2
commit e064ace885
6 changed files with 28 additions and 9 deletions
+2 -2
View File
@@ -86,8 +86,8 @@ void PhysicsSolver::step(
}
vel.x /= 1.0f + delta * linearDamping;
vel.z /= 1.0f + delta * linearDamping;
if (hitbox.verticalDamping) {
vel.y /= 1.0f + delta * linearDamping;
if (hitbox.verticalDamping > 0.0f) {
vel.y /= 1.0f + delta * linearDamping * hitbox.verticalDamping;
}
AABB aabb;