Converting Distance between 2 Axis to Scale


#1

Hello,
I haven’t been able to figure this out how to calculate the distance between two Axis which can be used for actual scale parameter of a card. Imagine 2 Axis are on each side of Card. Then by moving each Axis, the scale parameter of Card gets changed as if it is in between 2 Axis.

Here is the thing, when two Axis are on the same X position while Y and Z are 0 I can calculate the scale like:
abs( Axis1.translate.x - Axis2.translate.x) -> I use this formula for my X in scale parameter, which works nicely.

But when Y is not zero for instance, of course that formula doesnt work. I have tried by adding this like:
( abs( Axis1.translate.x - Axis2.translate.x) + abs( Axis1.translate.y - Axis2.translate.y) ) * K which K is a variable. This doesn’t work neither.

I would really appreciate if some one could help me on this.


#2

Hey guys,

I kinda sorted it out. If you interested in having a look check it here:
Nukepedia

Cheers.