Tweak chase crit perception
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
module Dodge.Creature.Perception (
|
||||
perceptionUpdate,
|
||||
chaseCritPerceptionUpdate,
|
||||
visionCheck,
|
||||
) where
|
||||
|
||||
import Linear
|
||||
import Control.Lens
|
||||
import qualified Data.Map.Strict as M
|
||||
import Data.Maybe
|
||||
@@ -152,7 +154,8 @@ visionCheck cr tpos = doFloatFloat (_viFOV vi) ang * doFloatFloat (_viDist vi) d
|
||||
where
|
||||
vi = _cpVision $ _crPerception cr
|
||||
cpos = _crPos cr
|
||||
ang = angleVV (unitVectorAtAngle (_crDir cr)) (tpos - cpos)
|
||||
dirvec = unitVectorAtAngle (_crDir cr)
|
||||
ang = angleVV dirvec (tpos - (cpos - _crRad cr *^ dirvec))
|
||||
d = dist tpos cpos
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user