(define gui-env (get-gui-environment device))
;; create the node which will be moved with the WSAD keys
(define gui-env (get-gui-environment device))
;; create the node which will be moved with the WSAD keys
-(define wall (add-sphere-scene-node! scene-manager))
-(set-position! wall '(0 0 30))
-(set-material-texture! wall 0 (get-texture driver "media/wall.bmp"))
-(set-material-flag! wall 'lighting #f)
+(define ball (add-sphere-scene-node! scene-manager))
+(set-position! ball '(0 0 30))
+(set-material-texture! ball 0 (get-texture driver "media/wall.bmp"))
+(set-material-flag! ball 'lighting #f)
;; create another node, movable using a scene node animator
(let ((cube (add-cube-scene-node! scene-manager))
;; create another node, movable using a scene node animator
(let ((cube (add-cube-scene-node! scene-manager))
(set-material-texture! cube 0 (get-texture driver "media/t351sml.jpg"))
(set-material-flag! cube 'lighting #f)
(add-animator! cube anim)
(set-material-texture! cube 0 (get-texture driver "media/t351sml.jpg"))
(set-material-flag! cube 'lighting #f)
(add-animator! cube anim)
(pos-x (car node-position))
(pos-y (cadr node-position))
(pos-z (caddr node-position)))
(pos-x (car node-position))
(pos-y (cadr node-position))
(pos-z (caddr node-position)))
(set! pos-x (- pos-x (* movement-speed frame-delta-time))))
(if (is-key-down? 'key-d)
(set! pos-x (+ pos-x (* movement-speed frame-delta-time))))
(set! pos-x (- pos-x (* movement-speed frame-delta-time))))
(if (is-key-down? 'key-d)
(set! pos-x (+ pos-x (* movement-speed frame-delta-time))))