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.
I know how to make a “string” visual between two points if you want…
How? Bc I have been trying for like 3 days
Do you want code or me to explain how?
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
Whatever just look at the code from this funny game I made to test lol
click to grappling hookersdfasdfasdfa
I’ll make a good example rn
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.
Here it is!