Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
module Dodge.Item.Weapon.Shatter (shootShatter) where
import Linear
import Dodge.Base.Collide
import Dodge.Block.Debris
import Dodge.Data.World
@@ -18,7 +19,7 @@ shootShatter _ cr w =
Opaque {} -> True
SeeThrough -> True
_ -> False
sp = _crPos cr +.+ 10 *.* unitVectorAtAngle dir
sp = cr ^. crPos ._xy +.+ 10 *.* unitVectorAtAngle dir
-- the 10 is arbtrary and should be changed to a muzzle position
dir = _crDir cr
ep = sp +.+ 200 *.* unitVectorAtAngle dir