Remove ssaTri, bullet movement is broken

This commit is contained in:
2021-12-15 17:34:20 +00:00
parent dccacd9d22
commit adab32bf68
13 changed files with 74 additions and 213 deletions
+3 -3
View File
@@ -6,17 +6,17 @@ import Control.Lens
dampField :: Magnet -> Particle -> Particle
dampField mg pt = case pt of
BulletPt{} | dist (head $ _btTrail' pt) (_mgPos mg) < 100 -> pt & btVel' *~ 0.5
BulletPt{} | dist (head $ _btTrail' pt) (_mgPos mg) < 100 -> pt & ptVel *~ 0.5
_ -> pt
curveLeftField :: Magnet -> Particle -> Particle
curveLeftField mg pt = case pt of
BulletPt{} | dist (head $ _btTrail' pt) (_mgPos mg) < 500 -> pt & btVel' %~ rotateV 0.2
BulletPt{} | dist (head $ _btTrail' pt) (_mgPos mg) < 500 -> pt & ptVel %~ rotateV 0.2
_ -> pt
curveAroundField :: Float -> Float -> Magnet -> Particle -> Particle
curveAroundField minrad maxrad mg pt = case pt of
BulletPt{} | thedist < maxrad -> pt & btVel' %~ rotateToCircle
BulletPt{} | thedist < maxrad -> pt & ptVel %~ rotateToCircle
where
thedist = dist btpos mgpos
mgpos = _mgPos mg