I’m trying to center the camera on an object when the object is clicked. Browsing trough the documentation I found two functions getScreenPosition and getScreenVect. Here’s how I’m trying to use them now:
screenPos = camera.getScreenPosition(obj) newpos = camera.getScreenVect(screenPos, screenPos) camera.position += newpos camera.position += newpos camera.position += newpos
This however doesn’t seem to work…
Am I at least using the right functions or did I get this completely wrong?