Start implementing wider grenade movement

This commit is contained in:
2025-08-03 23:23:55 +01:00
parent ea2e67c9ab
commit 2a93b7f733
6 changed files with 200 additions and 146 deletions
+2 -2
View File
@@ -22,11 +22,11 @@ updateDebrisChunk w db = (w, mdb)
sv = db ^. dbVel
sp = _dbPos db
np = sp + sv
cdb = case collide3 sp np w of
cdb = case collide3WallsFloor sp np w of
(p,Nothing) -> db & dbPos .~ p
& dbVel -~ V3 0 0 1
& dbRot %~ dospin
(p,Just n) -> db & dbPos .~ p + (0.0001 * normalize n)
(p,Just (n,_)) -> db & dbPos .~ p + (0.0001 * normalize n)
& dbVel .~ (0.7 * reflectInNormal n sv) - V3 0 0 1
dospin = (_dbSpin db *)
mdb = do