Best practice for touch/mouse pressed on translated object

Hi guys,

Is there a standard, or best practice kind of way to handle the logic when your interface (button, sprite, etc) that you want to interact with is being translated/ rotated/ scaled? I’ve used different techniques – offsetting the mouse.x or touch.x location, offsetting the interface coordinates, and some GL matrix stuff that I didn’t completely understand. It starts to get pretty messy the more translations, etc go on top of each other, so I was wondering what the best way to go about it is.

In Processing, I’ve used modelX() or screenX(), and haven’t found a similar equivalent yet in OF. Curious to know how the experienced folks out there do it …

I am going crazy too :smile: but I fear you have to write your own classes, or use addons, in any case OF use FIFO layout for simple things, like ofSetColor and then ofRect, but for more difficult things you have to save x and y coordinates in custom classes or use like I said the of addons