Trying to get a fishing rod working in 2D and found this promising looking method [here][1] using verlet physics, unfortunately it doesn't go into how exactly it's utilized.
It mentions having an array of custom `LineParticles` objects, and says to iterate through them in Fixed Update to apply an acceleration, but I'm confused with how you tie the `LineParticles` to a line renderer so you can see it on screen, or how you then add forces to it to get it moving. I've created and stored them in a list (code provided below), but no idea what to do with them beyond this point. public struct LineParticle { public Vector2 Position; public Vector2 OldPosition; public Vector2 Acceleration; } private void OnEnable() { //create list of particles and store in a list for (int i = 0; i < lineRenderer.positionCount; i++) { LineParticle newParticle; newParticle.Acceleration = acceleration; newParticle.Position = newParticle.OldPosition = lineRenderer.GetPosition(i); } } [1]: https://www.reddit.com/r/Unity3D/comments/1kx1hp/best_way_to_do_fishing_line/
It mentions having an array of custom `LineParticles` objects, and says to iterate through them in Fixed Update to apply an acceleration, but I'm confused with how you tie the `LineParticles` to a line renderer so you can see it on screen, or how you then add forces to it to get it moving. I've created and stored them in a list (code provided below), but no idea what to do with them beyond this point. public struct LineParticle { public Vector2 Position; public Vector2 OldPosition; public Vector2 Acceleration; } private void OnEnable() { //create list of particles and store in a list for (int i = 0; i < lineRenderer.positionCount; i++) { LineParticle newParticle; newParticle.Acceleration = acceleration; newParticle.Position = newParticle.OldPosition = lineRenderer.GetPosition(i); } } [1]: https://www.reddit.com/r/Unity3D/comments/1kx1hp/best_way_to_do_fishing_line/