Announcement

Collapse
No announcement yet.

[Help]What is the proper way to implement a dash / dodge movement in multiplayer?

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

    [Help]What is the proper way to implement a dash / dodge movement in multiplayer?

    I was trying to make a dash movement that the character moves fast forward then stops its movement immediately.
    However,when I was playing as a client,the character looked weird while stopping.
    It looked like the character dashed too far on the client then was corrected its location by the server,so the character jitterd for a moment.
    And I want my character to move more smoothly.
    How can I achieve that?

    Here's my blueprint and a slowed gif to demonstrate.
    Click image for larger version

Name:	203282-dash_bp.png
Views:	1
Size:	312.4 KB
ID:	1226502
    Click image for larger version

Name:	203283-5yc6goh+-+imgur.gif
Views:	1
Size:	312.3 KB
ID:	1226503
    Last edited by HeavyMetalSlime; 08-09-2017, 06:33 AM. Reason: Problem solved

    #2
    Probably if you lerp the location instead of launching the character it wont have any problems. Did'nt test it on multiplayer though, so i'm not sure.

    Comment


      #3
      Thank you! It worked!
      I didn't use the lerp vector node,though.Don't know if it's going to cause other problems.

      And here is my blueprint if anyone is in need.
      Click image for larger version

Name:	3.png
Views:	1
Size:	502.6 KB
ID:	1132232

      Comment


        #4
        Im afraid your implementation "set world location" may cause bugs... have you tried to dash into wall? Imo first use capsule trace to determine max dash if you stuck in wall, if its working then no need to modify anything.

        Btw that step-back isnt bug, its network movement prediction feature, which work well in many cases (but not in this one ofc)

        Comment


          #5
          If the sweep is set to checked,my character won't dash into walls.
          But I don't know how it works.

          Comment


            #6
            Originally posted by HeavyMetalSlime View Post
            If the sweep is set to checked,my character won't dash into walls.
            But I don't know how it works.
            ok, then its good i played with those "dashes" too and found some bugs (dashing under landscape) but looks like sweep might solve this. Test it also on hilly terrain with some 90° angles, because you may stop on tiny stones while capsule movement component can step over those hilly terrain.
            imo making good multiplayer dash is challenge but i not tested it yet very extendedly but it will wait me.

            Comment


              #7
              Hmm...get stopped by tiny stones...
              I didn't think about that,because I only tested it in a simple map.
              But this is surely a problem.And it needs to be solved.
              Maybe there are some better ways to implement the dash move

              Comment


                #8
                Originally posted by Name368 View Post
                ok, then its good i played with those "dashes" too and found some bugs (dashing under landscape) but looks like sweep might solve this. Test it also on hilly terrain with some 90° angles, because you may stop on tiny stones while capsule movement component can step over those hilly terrain.
                imo making good multiplayer dash is challenge but i not tested it yet very extendedly but it will wait me.
                Well,I kind of solved the problem.
                This may not be the best solution though.
                I added the hit result's normal to the original moving vector.
                And it looks like this.(I'm making a 2D game,so the Y value is 0.)
                Click image for larger version

Name:	4.png
Views:	1
Size:	237.5 KB
ID:	1132236

                Comment

                Working...
                X