finally working buoyancy sim

This commit is contained in:
minjaesong
2024-07-21 16:26:49 +09:00
parent 082e1b7ec0
commit 42b3b9e02f
6 changed files with 100 additions and 116 deletions

View File

@@ -115,7 +115,7 @@ object WorldCamera {
val newX = if (Math.abs(newX1 - oldX) < Math.abs(newX2 - oldX)) newX1 else newX2
val newY = player.hitbox.centeredY - (height / 2)
val pVecMagn = (player.externalV + (player.controllerV ?: nullVec)).magnitude
val pVecMagn = (player.externalV + player.controllerV).magnitude
val cVecMagn = Math.sqrt((newX - oldX).sqr() + (newY - oldY).sqr()) * fpsRatio
// println("$cVecMagn\t$pVecMagn\t${cVecMagn / pVecMagn}")