changeset 148:511112c44b16

muscles are tested and work!
author Robert McIntyre <rlm@mit.edu>
date Fri, 03 Feb 2012 01:04:42 -0700
parents 72801a20b8e5
children 1e6beed24cec
files assets/Models/creature1/try-again.blend org/test-creature.org
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
     1.1 Binary file assets/Models/creature1/try-again.blend has changed
     2.1 --- a/org/test-creature.org	Fri Feb 03 00:48:34 2012 -0700
     2.2 +++ b/org/test-creature.org	Fri Feb 03 01:04:42 2012 -0700
     2.3 @@ -1117,7 +1117,7 @@
     2.4          control (.getControl target RigidBodyControl)]
     2.5      (fn [n]
     2.6        (let [pool-index (min n (count fibers))]
     2.7 -        (.applyTorque control (force-index n))))))
     2.8 +        (.applyTorque control (.mult axis (force-index n)))))))
     2.9  
    2.10  
    2.11  (defn enable-muscles
    2.12 @@ -1148,6 +1148,8 @@
    2.13                           "Sounds/pure.wav" false)
    2.14          prop (proprioception creature)
    2.15          prop-debug (proprioception-debug-window)
    2.16 +
    2.17 +        muscle-fns (enable-muscles creature)
    2.18          ;; dream
    2.19  
    2.20          ]
    2.21 @@ -1173,7 +1175,15 @@
    2.22                    (if value
    2.23                      (do
    2.24                        (println-repl "play-sound")
    2.25 -                      (.play bell))))})
    2.26 +                      (.play bell))))
    2.27 +                "key-h"
    2.28 +                (fn [_ value]
    2.29 +                  (if value
    2.30 +                    (do
    2.31 +                      (println-repl "muscle activating!")
    2.32 +                      ((first muscle-fns)  199))))
    2.33 +
    2.34 +                })
    2.35          (fn [world]
    2.36            (light-up-everything world)
    2.37            (enable-debug world)
    2.38 @@ -1190,7 +1200,7 @@
    2.39            ;; world (file-str "/home/r/proj/ai-videos/hand"))
    2.40            ;;(.setTimer world (RatchetTimer. 60))
    2.41            (speed-up world)
    2.42 -          ;;(set-gravity world (Vector3f. 0 0 0))
    2.43 +          (set-gravity world (Vector3f. 0 0 0))
    2.44            )
    2.45          (fn [world tpf]
    2.46            ;;(dorun