comparison org/joint.org @ 351:0596613e5a41

evened out touch sensor sensitivity in joint creature model.
author Robert McIntyre <rlm@mit.edu>
date Mon, 23 Jul 2012 07:59:55 -0500
parents d2806d5c5f74
children d9128eb5f42e
comparison
equal deleted inserted replaced
350:d2806d5c5f74 351:0596613e5a41
28 #+begin_src clojure 28 #+begin_src clojure
29 (in-ns 'cortex.joint) 29 (in-ns 'cortex.joint)
30 30
31 (def joint "Models/joint/joint.blend") 31 (def joint "Models/joint/joint.blend")
32 32
33 (defn load-creature [] 33 (defn joint-creature []
34 (load-blender-model joint)) 34 (load-blender-model joint))
35 35
36 (defn test-creature [] 36 (defn test-joint-creature []
37 (let [me (sphere 0.5 :color ColorRGBA/Blue :physical? false) 37 (let [me (sphere 0.5 :color ColorRGBA/Blue :physical? false)
38 creature (doto (load-creature) (body!)) 38 creature (doto (joint-creature) (body!))
39 39
40 ;;;;;;;;;;;; Sensors/Effectors ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 40 ;;;;;;;;;;;; Sensors/Effectors ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
41 touch (touch! creature) 41 touch (touch! creature)
42 touch-display (view-touch) 42 touch-display (view-touch)
43 43
60 :color ColorRGBA/Gray :mass 0)] 60 :color ColorRGBA/Gray :mass 0)]
61 (world 61 (world
62 (nodify [floor me creature]) 62 (nodify [floor me creature])
63 standard-debug-controls 63 standard-debug-controls
64 (fn [world] 64 (fn [world]
65 ;;(speed-up world)
66 (light-up-everything world)
65 (let [timer (RatchetTimer. 60)] 67 (let [timer (RatchetTimer. 60)]
66 (.setTimer world timer) 68 (.setTimer world timer)
67 (display-dilated-time world timer))) 69 (display-dilated-time world timer)))
68 (fn [world tpf] 70 (fn [world tpf]
69 (.setLocalTranslation me (.getLocation (.getCamera world))) 71 (.setLocalTranslation me (.getLocation (.getCamera world)))