ofCamera - Zoom to mouse position

Hi all,

I have an ofCamera camera with ortho enabled and can’t figure out how to zoom to the mouse position. I already searched the forum with no luck finding an answer.

I tried setting a new position of the camera (depending on mouse position) and then scaling, scaling then setting a new position, and a few other things that didn’t work.

Any help on how to do this?


I still couldn’t figure this out.

Anyone with an idea on how to do this?

Hi, I have an addon exactly for doing this.


1 Like

I’ll give it a try and let you know how it went.

Thanks a lot !

Sorry for taking so long to reply.
It works perfect, just what i needed.
Thanks !!

Just to let you know, it seems it’s not working for OF 0.8.4