oakes / play-clj

A Clojure game library
The Unlicense
940 stars 72 forks source link

Fixed issue with position! screen Vector3 IllegalAccessError #64

Closed kamn closed 9 years ago

kamn commented 9 years ago

Previously the code would try to directly set the position vector with the new Vector3 that it was passed. The problem is that the position vector is final.

/** the position of the camera **/
public final Vector3 position = new Vector3();

I looked for a position function in the Camera.java file for libgdx but didn't see any. They had translate but that was not an absolute position but relative to where the camera currently is. I just forwarded the call to (postition! object x y z).

oakes commented 9 years ago

Thanks!