Long story short, my player's sprite can grab some object thanks to the physic behavior, like, when the character is near an object and the cursor is overlapping this object, the player can grab it and move it while pressing the space bar. It works fine but I'd like to add a little effect to it.

Like, a "link" or "light ray" which connects the character to the object. I mean, kinda like this :

Also, If possible :

a) As the object is near the player => The ray/link is largeb) As the player is moving the object far away from him => The ray become more and more thinner according to the distance between the object and the player

But that'd be a bonus, if you can already explain me how to create such a visual link between sprites I'll be glad of course. If it appears that you know how to make the previous conditions too, I'll not blame you haha. Thanks for reading, hope you can help !