I am trying to make a weapon sight Dynamically scale depending on how far away the target is.
However right now it does not scale. the sight stays the same because there the
distance property does not change.
(the action it plays is simply an animation of the sight scaling with frame 1 really big and frame 100 very small)
Logic setup for sight.
The sight is on an overlay scene.
I already have a ray being cast from the camera and a script to move an empty to the hit position of the ray. The guns then tracks to that empty so it will always fire to the center of the screen. However the problem occurs when I try to get the distance between the world position of the camera, and the world position of the empty and assign it to the property
My question is this:
How can I get the distance between the camera's world position and the empty's world position and assign that value to a game property?