diff org/world.org @ 52:00d0e1639d4b

simplified world, got buggy physics ragdoll working
author Robert McIntyre <rlm@mit.edu>
date Mon, 14 Nov 2011 21:30:23 -0700
parents 183744c179e6
children 4b5f00110d8c
line wrap: on
line diff
     1.1 --- a/org/world.org	Mon Nov 14 19:44:30 2011 -0700
     1.2 +++ b/org/world.org	Mon Nov 14 21:30:23 2011 -0700
     1.3 @@ -293,14 +293,18 @@
     1.4                            (Vector3f. 0 -9.81 0))
     1.5               ;; go through every object and add it to the physics
     1.6               ;; manager if relevant.
     1.7 -             (traverse (fn [geom]
     1.8 -                         (dorun
     1.9 -                          (for [n (range (.getNumControls geom))]
    1.10 -                            (do
    1.11 -                              (.add (.getPhysicsSpace physics-manager)
    1.12 -                                    (.getControl geom n))))))
    1.13 -                       (.getRootNode this))
    1.14 +             ;;(traverse (fn [geom]
    1.15 +             ;;            (dorun
    1.16 +             ;;             (for [n (range (.getNumControls geom))]
    1.17 +             ;;               (do
    1.18 +             ;;                 (cortex.util/println-repl
    1.19 +             ;;                  "adding " (.getControl geom n))
    1.20 +             ;;                 (.add (.getPhysicsSpace physics-manager)
    1.21 +             ;;                       (.getControl geom n))))))
    1.22 +             ;;          (.getRootNode this))
    1.23               ;; call the supplied setup-fn
    1.24 +             ;; simpler !
    1.25 +             (.addAll (.getPhysicsSpace physics-manager) root-node)
    1.26               (if setup-fn
    1.27                 (setup-fn this))))
    1.28            (simpleUpdate