Hey there!

Could anybody explain me the logic behind quad translation, please?

I have a quad which can be transformed with various scale factors (AspectRatio --> Uniform Scale).

Besides that there can be a translation on the x- or y-axis. However I do not want the quad to leave the renderer window. Not even partially.

As you know, the possible translation depends on the scale factor. The higher the scale factor, the smaller the possible translation.

What is the easiest way to calculate the maximum possible translation, with the scale factor as input?

I assume it’s a mathematical issue – this had always been my weak spot.