BP: draw an image between two given points: possible?

Hi all,
I plan to dynamically scale my image between two given points. So: I have this image and I want UE to set its scale so it stretches but fits between point A and point B. No matter where I set those points, I want this image to follow and stretch or compress. How to do this?

Hi once again @agiro
i have such an widget ready
dark blue variables(A,B) are vector 2D, and cast to canvas slot will be found , no need to make one

showing each widgets settings

make sure of there settings , only positive values are acceptable for now
(in A,B)

cheers!!

unable to replicate? tell me if you need the projects .zip file.

@agiro zip is 2.31 MB

Once again thanks for the help :smiley: Yes, I would like the zip if you can manage, this is a bit daunting at first glance.
By the way, How to mark a comment as answer? And besides the likes, is it possible to add to your reputation? Loads of help you gave me.
Edit: I see this is an answer, can mark as solution.

email sent. Thanks in advance.

File received. I check on it and after understanding it there will be no issues. Thanks once again!

mail me here (there is no way to attach zip here)

i will send an reply with zip attached

thanks for your support!! :smiley:

you are welcome once again:)

nice one , i wonder why i didn’t come up with this ? this is helpful to me as well. :slight_smile:

Heh just after I started understanding your solution, I found another one and it works:
Simple linear ratio (funny, just passed calculus and computational theory great go :smiley: )
So I have a maximum distance, got my spring between it. The tooth moves, the distance gets smaller. I get the distance, divide it by the max distance and apply it to the Y portion of my spring, keeping the X 1. This way it automatically fits the spring perfectly between the tooth and the stack.