Partially working mounts on lerp doors

This commit is contained in:
2025-10-22 11:03:46 +01:00
parent f8073381ee
commit af245fb5bf
10 changed files with 78 additions and 150 deletions
+4
View File
@@ -3,6 +3,7 @@
module Dodge.ShiftPoint where
import Geometry
import Linear
shiftPointBy :: Point2A -> Point2 -> Point2
shiftPointBy (pos, rot) !p = pos +.+ rotateV rot p
@@ -10,6 +11,9 @@ shiftPointBy (pos, rot) !p = pos +.+ rotateV rot p
compP2A :: Point2A -> Point2A -> Point2A
compP2A (p1,r1) (p2,r2) = (p1 +.+ rotateV r1 p2, r1 + r2)
lerpP2A :: Point2A -> Point2A -> Float -> Point2A
lerpP2A (p1,a1) (p2,a2) x = (p1 + x *^ (p2 - p1), a1 + x * diffAngles a2 a1)
invShiftPointBy :: (Point2, Float) -> Point2 -> Point2
invShiftPointBy (p1, r) p2 = rotateV (- r) $ p2 -.- p1