Move towards being able to orient positions on attached items

This commit is contained in:
2024-10-01 20:13:08 +01:00
parent fa4e117f93
commit 8df6b31062
9 changed files with 61 additions and 199 deletions
+7 -3
View File
@@ -1,5 +1,7 @@
module Dodge.LightSource.Torch where
import Color
import Dodge.WorldEvent.Flash
import Dodge.Data.World
import Dodge.Item.Draw -- heldItemOffset needs to be moved somewhere more sensible
import Dodge.LightSource -- this needs to be split!
@@ -7,12 +9,14 @@ import Geometry
import LensHelp
createTorchLightOffset :: Creature -> Item -> Point3 -> World -> World
createTorchLightOffset cr it off =
cWorld . lWorld . tempLightSources
createTorchLightOffset cr it off = muzFlareAt yellow pos (_crDir cr) .
(cWorld . lWorld . tempLightSources
.:~ tlsTimeRadColPos
1
250
0.7
(p +.+.+ rotate3 (_crDir cr) (heldItemOffset it cr (off +.+.+ V3 8 0 1.5)))
pos
)
where
pos = (p +.+.+ rotate3 (_crDir cr) (heldItemOffset it cr (off +.+.+ V3 8 0 1.5)))
p = addZ 0 $ _crPos cr