Beam bending and snap to target

Hi! I’m working on a game using a beam weapon. I’ve been experimenting a bit with Beams but i cannot seem to make them look or function how i want them to.

Here is a video example of how i want the beam to work

You can see the beam is straight when not targeting an object, but the beam target snaps to the object when the crosshair hits it, and stays on it even if you look away, bending the beam.

How would i go about achieving this kind of real-time beam bending after the beam snaps to a target? My beams are straight, and i cannot seem to figure out how to position the tangents to make it actually bend at all, let alone bend dynamically like this.

Any help is appreciated!

this is how you would bend a spline like that, beams should be about the same.