1
\$\begingroup\$

i want my entities to be at 100% scaling (for example 128x128 pixels) when they are at 40% of the screen height (for example 480 pixels at 100%), so when they are at 41%, they are at 99% scaling (126,72x126,72 pixels).

any idea of how i can achieve this? thanks

\$\endgroup\$
2
  • 1
    \$\begingroup\$ That doesn't really make sense. You want your entities height to be based of a calculation that involves the entities height...? \$\endgroup\$
    – Ben
    Jun 30, 2014 at 4:34
  • \$\begingroup\$ i mean position of the screen, position y \$\endgroup\$
    – Scanevaro
    Jun 30, 2014 at 17:19

1 Answer 1

0
\$\begingroup\$

This seems like a 2D view in which case it should be feasible to project the entity's rendered size at 100% scaling, then figure out the ratio of that value to the total viewport size and go from there.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .