# HG changeset patch # User Robert McIntyre # Date 1328256282 25200 # Node ID 511112c44b1663ee9a2073cb17b1e5b423c5dbe0 # Parent 72801a20b8e5d2b994b538e2a4e868b6db0750ad muscles are tested and work! diff -r 72801a20b8e5 -r 511112c44b16 assets/Models/creature1/try-again.blend Binary file assets/Models/creature1/try-again.blend has changed diff -r 72801a20b8e5 -r 511112c44b16 org/test-creature.org --- a/org/test-creature.org Fri Feb 03 00:48:34 2012 -0700 +++ b/org/test-creature.org Fri Feb 03 01:04:42 2012 -0700 @@ -1117,7 +1117,7 @@ control (.getControl target RigidBodyControl)] (fn [n] (let [pool-index (min n (count fibers))] - (.applyTorque control (force-index n)))))) + (.applyTorque control (.mult axis (force-index n))))))) (defn enable-muscles @@ -1148,6 +1148,8 @@ "Sounds/pure.wav" false) prop (proprioception creature) prop-debug (proprioception-debug-window) + + muscle-fns (enable-muscles creature) ;; dream ] @@ -1173,7 +1175,15 @@ (if value (do (println-repl "play-sound") - (.play bell))))}) + (.play bell)))) + "key-h" + (fn [_ value] + (if value + (do + (println-repl "muscle activating!") + ((first muscle-fns) 199)))) + + }) (fn [world] (light-up-everything world) (enable-debug world) @@ -1190,7 +1200,7 @@ ;; world (file-str "/home/r/proj/ai-videos/hand")) ;;(.setTimer world (RatchetTimer. 60)) (speed-up world) - ;;(set-gravity world (Vector3f. 0 0 0)) + (set-gravity world (Vector3f. 0 0 0)) ) (fn [world tpf] ;;(dorun