diff options
| author | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 18:32:01 +0200 | 
|---|---|---|
| committer | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 18:32:01 +0200 | 
| commit | bd7c8d76bd54c874bbfad9da900d6d2a98fd5e61 (patch) | |
| tree | 7f6223199a24c253ec51ea302b0a35fadb252937 | |
| parent | 3bf679ded27bf9afd902cf07533824105055a9d6 (diff) | |
Fixed forward vector in rpgTransform
| -rw-r--r-- | Spear/Math/MatrixUtils.hs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/Spear/Math/MatrixUtils.hs b/Spear/Math/MatrixUtils.hs index 434e36a..52d4014 100644 --- a/Spear/Math/MatrixUtils.hs +++ b/Spear/Math/MatrixUtils.hs | |||
| @@ -31,7 +31,7 @@ rpgTransform :: Float -- ^ The height above the ground. | |||
| 31 | rpgTransform h mat = | 31 | rpgTransform h mat = | 
| 32 | let r = let r' = M3.right mat in vec3 (V2.x r') (V2.y r') 0 | 32 | let r = let r' = M3.right mat in vec3 (V2.x r') (V2.y r') 0 | 
| 33 | u = V3.unity | 33 | u = V3.unity | 
| 34 | f = let f' = M3.forward mat in vec3 (V2.x f') 0 (-V2.y f') | 34 | f = let f' = M3.forward mat in vec3 (V2.x f') 0 (V2.y f') | 
| 35 | t = (vec3 0 h 0) + let t' = M3.position mat in -(vec3 (V2.x t') 0 (-V2.y t')) | 35 | t = (vec3 0 h 0) + let t' = M3.position mat in -(vec3 (V2.x t') 0 (-V2.y t')) | 
| 36 | in mat4 | 36 | in mat4 | 
| 37 | (V3.x r) (V3.x u) (V3.x f) (V3.x t) | 37 | (V3.x r) (V3.x u) (V3.x f) (V3.x t) | 
