 
 (defn ^:private body-x
   [entity]
-  (let [^btCollisionObject object (u/get-obj entity :body)]
+  (let [^btCollisionObject object (:object (u/get-obj entity :body))]
     (-> object .getWorldTransform (. val) (aget Matrix4/M03))))
 
 (defn ^:private body-y
   [entity]
-  (let [^btCollisionObject object (u/get-obj entity :body)]
+  (let [^btCollisionObject object (:object (u/get-obj entity :body))]
     (-> object .getWorldTransform (. val) (aget Matrix4/M13))))
 
 (defn ^:private body-z
   [entity]
-  (let [^btCollisionObject object (u/get-obj entity :body)]
+  (let [^btCollisionObject object (:object (u/get-obj entity :body))]
     (-> object .getWorldTransform (. val) (aget Matrix4/M23))))
 
 (defmethod c/body-position!
-  btCollisionObject
+  Body3D
   [entity x y z]
-  (let [^btCollisionObject object (u/get-obj entity :body)]
+  (let [^btCollisionObject object (:object (u/get-obj entity :body))]
     (.setWorldTransform object
       (doto (m/matrix-4*)
         (m/matrix-4! :set-translation x y z)))))
 
 (defmethod c/body-x!
-  btCollisionObject
+  Body3D
   [entity x]
   (c/body-position! entity x (body-y entity) (body-z entity)))
 
 (defmethod c/body-y!
-  btCollisionObject
+  Body3D
   [entity y]
   (c/body-position! entity (body-x entity) y (body-z entity)))
 
 (defmethod c/body-z!
-  btCollisionObject
+  Body3D
   [entity z]
   (c/body-position! entity (body-x entity) (body-y entity) z))
 

      (.at arr i))))

(defmethod c/update-physics!
  btCollisionWorld
  [screen & [entities]]
  ; initialize bodies
  (doseq [e entities]

          (bullet-3d! screen :remove-collision-object body))))))

(defmethod c/step!
  World3D
  [{:keys [delta-time max-sub-steps time-step]
     :or {max-sub-steps 5 time-step (/ 1 60)}
     :as screen}
   & [entities]]
  (when (isa? (type (:object (u/get-obj screen :world))) btDynamicsWorld)
    (bullet-3d! screen :step-simulation delta-time max-sub-steps time-step)
    (when entities
      (map (fn [e]
             (if (u/get-obj e :body)
               (assoc e
                      :x (body-x e)
                      :y (body-y e)
                      :z (body-z e))
               e))
           entities))))
