Mercurial > cortex
comparison org/util.org @ 216:f5ea63245b3b
completed vision demonstration video and first draft of vision.org
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 10 Feb 2012 11:34:07 -0700 |
parents | d3a2abfac405 |
children | d1206b11ae2d |
comparison
equal
deleted
inserted
replaced
215:f283c62bd212 | 216:f5ea63245b3b |
---|---|
401 (if (not value) | 401 (if (not value) |
402 (let [camera (.getCamera game) | 402 (let [camera (.getCamera game) |
403 cannon-ball | 403 cannon-ball |
404 (sphere 0.7 | 404 (sphere 0.7 |
405 :material "Common/MatDefs/Misc/Unshaded.j3md" | 405 :material "Common/MatDefs/Misc/Unshaded.j3md" |
406 :texture "Textures/PokeCopper.jpg" | 406 :color ColorRGBA/White |
407 :name "cannonball!" | |
407 :position | 408 :position |
408 (.add (.getLocation camera) | 409 (.add (.getLocation camera) |
409 (.mult (.getDirection camera) (float 1))) | 410 (.mult (.getDirection camera) (float 1))) |
410 :mass 3)] ;200 0.05 | 411 :mass 3)] ;200 0.05 |
411 (.setLinearVelocity | 412 (.setLinearVelocity |
412 (.getControl cannon-ball RigidBodyControl) | 413 (.getControl cannon-ball RigidBodyControl) |
413 (.mult (.getDirection camera) (float 50))) ;50 | 414 (.mult (.getDirection camera) (float 50))) ;50 |
414 (add-element game cannon-ball (if node node (.getRootNode game))))))) | 415 (add-element game cannon-ball (if node node (.getRootNode |
416 game))) | |
417 cannon-ball)))) | |
415 ([] | 418 ([] |
416 (fire-cannon-ball false))) | 419 (fire-cannon-ball false))) |
417 | 420 |
418 (def standard-debug-controls | 421 (def standard-debug-controls |
419 {"key-space" (fire-cannon-ball)}) | 422 {"key-space" (fire-cannon-ball)}) |