# What is the relation between Distance between 2 points and Actor Scale?

Hey there. I am coding a mechanic that scales an actor based on the most spread distance (in X and Y) of a set of points. I have managed to make the actor location be the spatial median of this said set of points, but the problem is that when I try to input the distances as scale for the actor, the scale is too big. I suspect that the points are not in the same space and thus the relations don’t match, but I am not sure if this is what is happening or how to fix it.

The scale is a multiplier, so if you put 2.0 scale in one direction, it’ll double. If you use a 1x1x1 cube, then the scale will equal its size in units, but your actors are likely larger than 1x1x1, so when you put in say 20 distance as the scale, it blows up the actor from like 5 wide to 100 wide.

1 Like

Sorry, I forgot to add how to fix this. You’ll want to find out the size of the Actors Mesh. Let’s pretend you have a 5x5x2 square prism. If you want it to scale up to a 20x20 area, you’ll have to multiply it by 20/5, or 4 so that it fills the area. You have to divide your scalar by the size of the Actor you’re scaling

1 Like