Mercurial > cortex
changeset 17:014b14d48092
fixed inacuraccy with touch implementation
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 23 Oct 2011 11:58:33 -0700 |
parents | d2e9f0d09475 |
children | 221052dac374 |
files | org/skin.org |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/org/skin.org Sun Oct 23 11:51:15 2011 -0700 1.2 +++ b/org/skin.org Sun Oct 23 11:58:33 2011 -0700 1.3 @@ -146,11 +146,13 @@ 1.4 (do 1.5 (let [results (CollisionResults.)] 1.6 (.collideWith node ray results) 1.7 - (let [answer (count (filter #(not (= geom (.getGeometry %))) results)) 1.8 + (let [answer (set (filter #(not (= geom %)) 1.9 + (map #(.getGeometry %) results))) 1.10 ;;color (contact-color answer) 1.11 ] 1.12 - ;;(dorun (map #(println-repl (.getName (.getGeometry %))) results)) 1.13 - answer ))))))) 1.14 + (if (= 2 (count answer)) 1.15 + (dorun (map #(println-repl (.getName %)) answer))) 1.16 + (count answer) ))))))) 1.17 1.18 (defn enable-debug [world] 1.19 (.enableDebug 1.20 @@ -215,8 +217,8 @@ 1.21 1.22 (defn test-skin [] 1.23 (let [b 1.24 - ;;(transparent-box) 1.25 - (transparent-sphere) 1.26 + (transparent-box) 1.27 + ;;(transparent-sphere) 1.28 ;;(sphere) 1.29 f (transparent-floor) 1.30 ;;controls