mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
update vertical damping & add rigidbody:get_vdamping
This commit is contained in:
parent
67a5741ed2
commit
e064ace885
6 changed files with 28 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue