Improve carriage/stride when falling down pit

This commit is contained in:
2026-03-27 00:33:19 +00:00
parent fed607681b
commit ac09ed6629
7 changed files with 119 additions and 109 deletions
+8
View File
@@ -45,6 +45,8 @@ rightHandPQ cr
| otherwise = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> (V3 (- f sa) (- off) 10, Q.qID)
Just (Walking sa RightForward) -> (V3 (- g sa) (- off) 10, Q.qID)
Just (Falling sa LeftForward) -> (V3 (- f sa) (- off) 10, Q.qID)
Just (Falling sa RightForward) -> (V3 (- g sa) (- off) 10, Q.qID)
_ -> (V3 0 (- off) 10, Q.qID)
where
off = 8
@@ -66,6 +68,8 @@ leftHandPQ cr
| otherwise = case cr ^? crStance . carriage of
Just (Walking sa RightForward) -> (V3 (- f sa) off 10 , Q.qID)
Just (Walking sa LeftForward) -> (V3 (- g sa) off 10 , Q.qID)
Just (Falling sa RightForward) -> (V3 (- f sa) off 10 , Q.qID)
Just (Falling sa LeftForward) -> (V3 (- g sa) off 10 , Q.qID)
_ -> (V3 0 off 10, Q.qID)
where
off = 8
@@ -89,6 +93,8 @@ leftLegPQ cr = Q.comp (0,Q.qz (_crMvDir cr - _crDir cr))
x = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> f sa
Just (Walking sa RightForward) -> - f sa
Just (Falling sa LeftForward) -> f sa
Just (Falling sa RightForward) -> - f sa
_ -> 0
off = 5
sLen = _strideLength $ _crStance cr
@@ -105,6 +111,8 @@ rightLegPQ cr = Q.comp (0,Q.qz (_crMvDir cr - _crDir cr))
x = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> -f sa
Just (Walking sa RightForward) -> f sa
Just (Falling sa LeftForward) -> -f sa
Just (Falling sa RightForward) -> f sa
_ -> 0
off = -5
sLen = _strideLength $ _crStance cr