# HG changeset patch # User Robert McIntyre # Date 1328169438 25200 # Node ID ffbab4199c0d2be4d77e1a399c05a4aa3da5c125 # Parent 16bdf9e80daf9f859b8c49bae171148769ac5518 going to de-macroify debug code diff -r 16bdf9e80daf -r ffbab4199c0d org/body.org --- a/org/body.org Thu Feb 02 00:05:17 2012 -0700 +++ b/org/body.org Thu Feb 02 00:57:18 2012 -0700 @@ -384,7 +384,6 @@ world-loop* `(fn [world# tpf#] (~world-loop world# tpf#) ~@splice-loop)] - `(let [~move-up? (atom false) ~move-down? (atom false) ~move-left? (atom false) @@ -407,7 +406,7 @@ and counterclockwise, and only affect roll." [] (let [hand (box 1 0.2 0.2 :position (Vector3f. 0 2 0) - :mass 0 :color ColorRGBA/Green :name "hand") + :mass 1 :color ColorRGBA/Green :name "hand") finger (box 1 0.2 0.2 :position (Vector3f. 2.4 2 0) :mass 1 :color ColorRGBA/Red :name "finger") joint-node (box 0.1 0.05 0.05 :color ColorRGBA/Yellow @@ -422,24 +421,48 @@ root (nodify [creature floor]) prop (joint-proprioception creature joint-node) - prop-view (proprioception-debug-window)] + prop-view (proprioception-debug-window) + finger-control (.getControl finger RigidBodyControl) + hand-control (.getControl hand RigidBodyControl) + + controls + (merge standard-debug-controls + {"key-y" + (fn [_ _] (.setEnabled finger-control true)) + "key-u" + (fn [_ _] (.setEnabled finger-control false)) + "key-i" + (fn [_ _] (.setEnabled hand-control true)) + "key-o" + (fn [_ _] (.setEnabled hand-control false)) + "key-q" + (fn [world _] (set-gravity world (Vector3f. 0 0 0))) + } + ) - (.setCollisionGroup - (.getControl hand RigidBodyControl) - PhysicsCollisionObject/COLLISION_GROUP_NONE) - + ] + (comment + (.setCollisionGroup + (.getControl hand RigidBodyControl) + PhysicsCollisionObject/COLLISION_GROUP_NONE) + ) + (with-movement - finger - ["key-r" "key-t" "key-f" "key-g" "key-v" "key-b"] + hand + ["key-w" "key-e" "key-s" "key-d" "key-x" "key-c"] [10 10 10 10 1 1] - (world - root - standard-debug-controls - (fn [world] + (with-movement + finger + ["key-r" "key-t" "key-f" "key-g" "key-v" "key-b"] + [10 10 10 10 1 1] + (world + root + controls + (fn [world] (.setTimer world (com.aurellem.capture.RatchetTimer. 60)) (set-gravity world (Vector3f. 0 0 0)) (light-up-everything world)) - (fn [_ _] (prop-view (list (prop)))))))) + (fn [_ _] (prop-view (list (prop))))))))) diff -r 16bdf9e80daf -r ffbab4199c0d org/test-creature.org --- a/org/test-creature.org Thu Feb 02 00:05:17 2012 -0700 +++ b/org/test-creature.org Thu Feb 02 00:57:18 2012 -0700 @@ -28,6 +28,9 @@ - New Senses/Effectors - Levitation - Telekenesis +- control of gravity within a certain radius +- speed up/slow time +- object creation/destruction - Symbol Sense Where objects in the world can be queried for description /