From 4806f6d6c4ecad725301b0dcea1e14fa9fd16bb6 Mon Sep 17 00:00:00 2001 From: Kamn Date: Mon, 16 Feb 2015 18:05:38 -0700 Subject: [PATCH] Added the ability to get the up vector of a camera. I didn't add the set ability yet. --- src/play_clj/core_cameras.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/play_clj/core_cameras.clj b/src/play_clj/core_cameras.clj index 060e5ca..9267b77 100644 --- a/src/play_clj/core_cameras.clj +++ b/src/play_clj/core_cameras.clj @@ -186,6 +186,11 @@ camera will be set." (.lookAt camera x y z) (.update camera))) +(defn up [screen] + "Returns the up vector of the camera in `screen`." + (let [^Camera camera (u/get-obj screen :camera)] + (. camera up))) + (defn near "Returns the near clipping plane distance of the camera in `screen`." [screen]