Make creatures rotate when falling down chasms

This commit is contained in:
2026-04-10 10:25:09 +01:00
parent c861de8981
commit b197e22de7
4 changed files with 21 additions and 6 deletions
+4 -1
View File
@@ -1,3 +1,4 @@
{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
@@ -11,6 +12,7 @@ import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.AimStance
import Geometry.Data
import Linear
data Stance = Stance
{ _carriage :: Carriage
@@ -23,7 +25,7 @@ data Carriage
| Floating
| Flying {_zSpeed :: Float, _flyInertia :: Float}
| Boosting Point2
| Falling
| Falling {_fallRot :: Quaternion Float, _fallDir :: Quaternion Float}
| OnGround
deriving (Eq, Ord, Show, Read) --Generic, Flat)
@@ -36,6 +38,7 @@ data Posture = Aiming | AtEase
makeLenses ''Stance
makeLenses ''Carriage
makeLenses ''Posture
deriveJSON defaultOptions ''Quaternion
deriveJSON defaultOptions ''FootForward
deriveJSON defaultOptions ''Posture
deriveJSON defaultOptions ''Carriage