How to make fishing string

I need to figure out how to make a fishing string attach to a hook and move with the hook but also anchor to the fishing rod.

1 Like

I know how to make a “string” visual between two points if you want…

1 Like

How? Bc I have been trying for like 3 days

Do you want code or me to explain how?

1 Like

Both so I can do it and figure out how to do it if I ever need it again

Well you need to take the coordinates, then average them to find the middle. That’s where the string’s position should be set to. (The string sprite should just be a straight line horizontal, 32*32), then do some math to determine the size. The angle can just be one point PointAt the other point.

As for the math you need to find the distance between the two points with pythag and the distance formula. Then you can divide that length by the length of the string in pixels, then multiply by 100 and increase x scale by that.

Wait a sec lemme fetch the code

1 Like

Whatever just look at the code from this funny game I made to test lol
https://flowlab.io/game/view/2238672
click to grappling hookersdfasdfasdfa

I’ll make a good example rn

1 Like

Thanks! I think all I would have to do is figure out what to do with your explanation and do somethign with always

Yeah the idea is kinda confusing. You want the string inbetween two objects, in the exact middle, and have it expand outward to fit the gap.

1 Like

Here it is!
Line Example

1 Like