Implement teleporting bullets
This commit is contained in:
@@ -429,6 +429,8 @@ cartePosToScreen cfig w = doWindowScale cfig . doRotate . doZoom . doTranslate
|
||||
doTranslate p = p -.- _carteCenter w
|
||||
doZoom p = _carteZoom w *.* p
|
||||
doRotate p = rotateV (negate $ _carteRot w) p
|
||||
crToMousePosOffset :: Creature -> World -> (Point2,Float)
|
||||
crToMousePosOffset cr w = (mouseWorldPos w -.- _crPos cr,0)
|
||||
{- | The mouse position in world coordinates. -}
|
||||
mouseWorldPos :: World -> Point2
|
||||
mouseWorldPos w = _cameraCenter w +.+ (1/_cameraZoom w) *.* rotateV (_cameraRot w) (_mousePos w)
|
||||
|
||||
Reference in New Issue
Block a user