mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'lboklin/prevent-full-stop-from-drag' into 'master'
Prevent drag forces from causing something to come to a complete stop See merge request veloren/veloren!2170
This commit is contained in:
commit
ae9d9d60ee
@ -86,7 +86,9 @@ fn integrate_forces(
|
||||
// This way we can only ever lose velocity and will never experience a reverse
|
||||
// in direction from events such as falling into water at high velocities.
|
||||
if new_v.dot(vel.0) < 0.0 {
|
||||
vel.0 -= vel.0.projected(&impulse);
|
||||
// Multiply by a factor to prevent full stop, as this can cause things to get
|
||||
// stuck in high-density medium
|
||||
vel.0 -= vel.0.projected(&impulse) * 0.7;
|
||||
} else {
|
||||
vel.0 = new_v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user