Announcement

Collapse
No announcement yet.

How to implement a physics based fishing line?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    How to implement a physics based fishing line?

    I only need the visual of a line moving around, attached to the end of a fishing rod. I haven't been able to find any UDK examples of such a thing.

    Anyone have any ideas?

    #2
    I don't know of any really easy way to do this. The first thing I can think of is mostly doing it yourself. Basically I would decide how many segments I would want the curve to have and then draw each segment on the HUD canvas using Draw3DLine().

    Maybe another thing that might work is an animation tree. You could make nodes that bend the pole when the fish is pulling on it. You could also have a loose and taut state for the line, and you could move the line and the rod's rotation based on direction to the fish.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


      #3
      I'm joining to this question. The only idea I have is to use cloth with material that makes the line thin enough.
      Bobber's location can be set by skeletal controller. For better physics, I would make it follow invisible KActor.

      Comment


        #4
        I managed to get a pretty convincing fishing line simulation using SplineLoftActors. As I cast I spawn two spline loft actors, connect one to the other, then during the tick update the location of the first to a socket on my rod tip, and the other to the location of the float.

        There aren't actually any physics involved, but the results seem decent enough.

        It still needs some work, but check it out (watch it in a high rez to see the line properly):

        I just need to tighten the line while reeling in (which i can do by adjusting the rotation of the loft splines), and attach the splines as soon as the projectile is cast. Also update the location of the end of the line to a socket on the circling fish. But i'm pretty happy with how it's turning out.

        One problem I'm having is if the material on the spline is set to lit, it flickers/flashes occasionally, so this is currently unlit. If anyone know a way around this, please let me know.
        Last edited by Coldscooter; 05-21-2019, 07:50 PM.

        Comment


          #5
          Originally posted by Coldscooter View Post
          One problem I'm having is if the material on the spline is set to lit, it flickers/flashes occasionally, so this is currently unlit. If anyone know a way around this, please let me know.
          Did you try to change lighting model to NonDirectional?

          Comment


            #6
            Originally posted by Avatarus View Post

            Did you try to change lighting model to NonDirectional?
            Yes, i still get the same flickering material. I'm pretty sure it's something to do with updating the spline position during runtime. I can hack around it by updating the material brightness based on the time of day, but it would be nice to solve it properly.

            Comment

            Working...
            X