Add code for determining item orientation
This commit is contained in:
@@ -5,8 +5,13 @@ module Dodge.Item.HeldOffset (
|
||||
heldItemOffset,
|
||||
heldItemRelativeOrient,
|
||||
heldItemOrient2D,
|
||||
itemRelativeOrient,
|
||||
) where
|
||||
|
||||
import Dodge.Item.Orientation
|
||||
import Dodge.DoubleTree
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.DoubleTree
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Data.AimStance
|
||||
import Dodge.Item.AimStance
|
||||
@@ -135,3 +140,9 @@ heldHandlePos = \case
|
||||
KEYCARD {} -> V2 3 0
|
||||
BLINKER -> V2 3 0
|
||||
BLINKERUNSAFE -> V2 3 0
|
||||
|
||||
itemRelativeOrient :: LocationLDT ItemLink Item -> Creature
|
||||
-> (Point3, Q.Quaternion Float) -> (Point3, Q.Quaternion Float)
|
||||
itemRelativeOrient loc cr
|
||||
= heldItemRelativeOrient (locToTop loc ^. locLDT . ldtValue) cr
|
||||
. orientLocation (V3 0 0 0,Q.qID) loc
|
||||
|
||||
Reference in New Issue
Block a user