improve vertical alignment of attack projectile

This commit is contained in:
2025-08-29 01:42:36 +01:00
parent fc540fa8d2
commit 23bf18acb6

View File

@@ -152,12 +152,12 @@ struct
(case #facing player of (case #facing player of
FACING_RIGHT => FACING_RIGHT =>
let let
val playerVec = PlayerAttackStandLeft.lerp val playerVec = PlayerAttackStandRight.lerp
(rx, ry, 3.0, windowWidth, windowHeight) (rx, ry, 3.0, windowWidth, windowHeight)
val projY = ry + (Constants.playerHeightReal / 2.0) val projY = ry + (Constants.playerHeightReal / 3.0)
val projX = rx + Constants.playerWidthReal val projX = rx + 32.0
val func = Vector.sub (attackLeftProjectiles, amt) val func = Vector.sub (attackRightProjectiles, amt)
val projectilesVec = func val projectilesVec = func
(projX, projY, 3.0, windowWidth, windowHeight) (projX, projY, 3.0, windowWidth, windowHeight)
in in
@@ -168,8 +168,8 @@ struct
val playerVec = PlayerAttackStandLeft.lerp val playerVec = PlayerAttackStandLeft.lerp
(rx, ry, 3.0, windowWidth, windowHeight) (rx, ry, 3.0, windowWidth, windowHeight)
val projY = ry + (Constants.playerHeightReal / 2.0) val projY = ry + (Constants.playerHeightReal / 3.0)
val projX = rx - Constants.playerWidthReal val projX = rx - 32.0
val func = Vector.sub (attackLeftProjectiles, amt) val func = Vector.sub (attackLeftProjectiles, amt)
val projectilesVec = func val projectilesVec = func
(projX, projY, 3.0, windowWidth, windowHeight) (projX, projY, 3.0, windowWidth, windowHeight)