changeset 142:ccd057319c2a

improved proprioception test
author Robert McIntyre <rlm@mit.edu>
date Thu, 02 Feb 2012 02:03:19 -0700
parents 22e193b5c60f
children d0f4b473ab4f
files org/body.org
diffstat 1 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/body.org	Thu Feb 02 01:35:21 2012 -0700
     1.2 +++ b/org/body.org	Thu Feb 02 02:03:19 2012 -0700
     1.3 @@ -404,7 +404,7 @@
     1.4     and counterclockwise, and only affect roll."
     1.5    []
     1.6    (let [hand    (box 1 0.2 0.2 :position (Vector3f. 0 2 0)
     1.7 -                     :mass 1 :color ColorRGBA/Green :name "hand")
     1.8 +                     :mass 0 :color ColorRGBA/Green :name "hand")
     1.9          finger (box 1 0.2 0.2 :position (Vector3f. 2.4 2 0)
    1.10                      :mass 1 :color ColorRGBA/Red :name "finger")
    1.11          joint-node (box 0.1 0.05 0.05 :color ColorRGBA/Yellow
    1.12 @@ -435,6 +435,21 @@
    1.13                  (fn [_ _] (.setEnabled hand-control false))
    1.14                  "key-i"
    1.15                  (fn [world _] (set-gravity world (Vector3f. 0 0 0)))
    1.16 +                "key-period"
    1.17 +                (fn [world _]
    1.18 +                  (.setEnabled finger-control false)
    1.19 +                  (.setEnabled hand-control false)
    1.20 +                  (.rotate creature (doto (Quaternion.)
    1.21 +                                      (.fromAngleAxis
    1.22 +                                       (float (/ Math/PI 15))
    1.23 +                                       (Vector3f. 0 0 -1))))
    1.24 +                                              
    1.25 +                  (.setEnabled finger-control true)
    1.26 +                  (.setEnabled hand-control true)
    1.27 +                  (set-gravity world (Vector3f. 0 0 0))
    1.28 +                  )
    1.29 +                
    1.30 +                  
    1.31                  }
    1.32                 )
    1.33