anchor.diff:  
     (let ((ret))
       (maphash (lambda (k v)
  -	       (push (funcall f k v) ret))
  -	     (gethash e *event-hash*))
  +               (push (funcall f k v) ret))
  +             (gethash e *event-hash*))
       ret))
   
   (clinch:defevent clinch:*on-mouse-down* (win mouse x y button state clicks ts)
  
positive.code:   ;;(format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse x y button state clicks ts)
  
    (let ((event `((:window . ,win)
  		 (:mouse . ,mouse)
  		 (:mouse-screen-position ,x . ,y)
  		 (:button . ,button)
  		 (:state . ,state)
  		 (:clicks . ,clicks)
  		 (:timestamp . ,ts)))
  	(collision-hash (make-hash-table :test 'equal)))
  
      (map-event (lambda (k v)
  		 (multiple-value-bind (collisions start ray) 
  		     (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash) 
  
  		   (when collisions
  		     (funcall v k collisions (acons :event :mouse-down
  						    (acons :ray-start start
  							   (acons :ray ray event))))
  		     (when (= button *click-button*)
  		       (setf *last-mouse-down-target* k)))))
  
  	       :mouse-down)
  		     
      (when (= button *drag-button*)
        (map-event (lambda (k v)
  		   (multiple-value-bind (collisions start ray) 
  		       (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash) 
  		     
  		     (when collisions
  		       (setf *dragging* k)
  		       (funcall v k collisions (acons :event :mouse-drag-start
  						      (acons :ray-start start
  							     (acons :ray ray event)))))))
  		         
  		 :mouse-drag-start))))
  
      
  (clinch:defevent clinch:*on-mouse-up* (win mouse x y button state clicks ts)
    
    ;;(format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse x y button state clicks ts)
      (let ((event `((:window . ,win)
  		   (:mouse . ,mouse)
  		   (:mouse-screen-position ,x . ,y)
  		   (:button . ,button)
  		   (:state . ,state)
  		   (:clicks . ,clicks)
  		   (:timestamp . ,ts)))
  	  (collision-hash (make-hash-table :test 'equal)))
        
        (map-event (lambda (k v)
  		   (multiple-value-bind (collisions start ray) 
  		       (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash)
  		     (when collisions
  		       (let ((e (acons :ray-start start
  				       (acons :ray ray event))))
  			 (when (and 
  				(= *click-button* button)
  				(eq *last-mouse-down-target* k))
  			   (let ((h (gethash :mouse-click *event-hash*)))
  			     (when h
  			       (let ((f (gethash k h)))
  				 (when f (funcall f k collisions  (acons :event :mouse-click e)))))))
  			 
  			 (funcall v k collisions (acons :event :mouse-up e)))
  		       (setf *last-mouse-down-target* nil))))
  		 
  		 :mouse-up)
        (when (= button *drag-button*)
  	(map-event (lambda (k v)
  		     (multiple-value-bind (collisions start ray) 
  			 (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash)
  		       (when (and collisions
  				  (eq *dragging* k))
  			 (funcall v k collisions (acons :event :mouse-drag-drop 
  							(acons :ray-start start
  							       (acons :ray ray event)))))))
  		   :mouse-drag-drop))))
      
  
    ;; (loop for n in *buttons*
    ;;     collect (check-intersect (car (children n)) n x y *viewport* *projection*)))
  
  ;; Rotate and translate with mouse
  (clinch:defevent clinch:*on-mouse-move* (win mouse state x y xrel yrel ts)
    ;;(format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse state x y xrel yrel ts)
  
    (let ((event `((:window . ,win)
  		 (:mouse . ,mouse)
  		 (:mouse-screen-position ,x . ,y)
  		 (:state . ,state)
  		 (:x-relative ,xrel)
  		 (:y-relative . ,yrel)
  		 (:timestamp . ,ts))) 
  	(cached-collisions (make-hash-table :test 'equal)))
  
      (map-event (lambda (k v)
  		 (multiple-value-bind (collisions start ray)
  		     (memoized-check-intersect (car (children k)) k x y *viewport* *projection* cached-collisions)
  		   (if collisions
  		       (progn 
  			 (unless (eq k *last-hover-target*)
  			    (setf *last-hover-target* k)
  			    (funcall v k collisions (acons :event :mouse-hover event)))
  			 (funcall v k collisions (acons :event :mouse-move
  							(acons :ray-start start
  							       (acons :ray ray event)))))
  		       (when (eq k *last-hover-target*)
  			 (let ((f (gethash k (gethash :mouse-exit *event-hash*))))
  			   (when f (funcall f k nil (acons :event :mouse-exit event)))
  			   (setf *last-hover-target* nil))))))
  			 
  	       :mouse-move)))
  
      
    
    ;; (loop for n in *buttons*
    ;;    for q = (car (children n))
    ;;    if (some (lambda (x)
    ;; 		(not (null x)))
    ;; 	      (alexandria:flatten (check-intersect q n x y *viewport* *projection*)))
    ;;    do (draw-button q 
    ;; 		     "Hello World!" 		 
    ;; 		     :line-width 12
    ;; 		     :foreground '(.1 .1 .1 1)
    ;; 		     :fill '(0 0 0 .4)
    ;; 		     :line '(0 0 .9 1))
    ;;    else 
    ;;    do (draw-button q 
    ;; 		     "Hello World!" 		 
    ;; 		     :line-width 10
    ;; 		     :foreground '(.1 .1 .1 1)
    ;; 		     :fill '(0 0 0 .2)
    ;; 		     :line '(0 0 .8 1))))
  
  
  
  
negative.code: 
  
  ;; a = (sb-cga:vec* button-end-position entity-distance)
  ;; b-pos & b = buttons start and end
  ;; d-pos and d-hat = screen position and direction
  
  (defun get-translation-from-matrix (m)
    (subseq (m4:get-column m 3) 0 3))
  
  (defun rejection (a b)
    (let ((n (v3:normalize a)))
      (v3:- b (v3:*s n (v:dot n b)))))
  
  ;;(multiple-value-bind (d-pos d) (clinch:get-screen-direction (sb-cga:inverse-matrix lens))
  (defun normalized-vector-match (n v)
    (v3:length 
     (v3:/ v n)))
  
  (defun calc2 (start-pos screen-direction screen-position)
    (let ((scale (- (abs (v3:dot start-pos screen-direction))
  		  (abs (v3:dot screen-position screen-direction)))))
      (v3:*s screen-direction scale)))
  
  (defun calculate-movement (d-pos d-hat a-pos a b-pos b)
    (let ((a-rel (v3:- a-pos d-pos))
          (b-rel (v3:- b-pos d-pos)))
      (v3:-
       (v3:+ b-rel
             (v3:*s b
                    ;; find 'x'
                    (/ (v3:dot (v3:- (v3:+ a-rel a)
                                     b-rel)
                               d-hat)
                       (v3:dot b d-hat))))
       (v3:+ a-rel a))))
  
  
  ;; Idea...
  ;; Start = original vector
  ;; Current = current vector
  (defun calculate-movement2 (start end)
    (v3:- end
          (v3:*s start (v3:dot start end))))
  
  
  ;; (if (eql mouse-state :dragging)
  
  ;;     (multiple-value-bind (d-pos d) (clinch:get-screen-direction (sb-cga:inverse-matrix lens))
  ;;       (let ((trans (calculate-movement d-pos d a-pos a button-start-position button-end-position)))
  
  ;;      (map nil (lambda (node start-pos)
  ;;                 (setf (clinch:transform node)
  ;;                       (sb-cga:matrix* (sb-cga:translate (clinch:make-vector (elt trans 0) (elt trans 1) (elt trans 2)))
  ;;                                       start-pos)))
  ;;           (elt mouse-drag-values 5) mouse-drag-nodes-start-pos)))
  