mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 07:20:04 -04:00
particles: fix "bugging back"
This commit is contained in:
parent
cf0a6a4927
commit
cebbf7a019
@ -105,6 +105,7 @@ abstract class Particle(
|
||||
|
||||
open fun move(velocity: Vec3d) {
|
||||
if (alreadyCollided) {
|
||||
this.previousPosition = Vec3d(position)
|
||||
return
|
||||
}
|
||||
var newVelocity = Vec3d(velocity)
|
||||
@ -113,9 +114,7 @@ abstract class Particle(
|
||||
newVelocity = connection.collisionDetector.collide(this, newVelocity, aabb)
|
||||
}
|
||||
|
||||
if (newVelocity != Vec3d.EMPTY) {
|
||||
forceMove(newVelocity)
|
||||
}
|
||||
forceMove(newVelocity)
|
||||
|
||||
if (abs(newVelocity.y) >= Y_VELOCITY_TO_CHECK && abs(velocity.y) < Y_VELOCITY_TO_CHECK) {
|
||||
this.alreadyCollided = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user