Announcement

Collapse
No announcement yet.

Simple Move to Location won't replicate Rotation

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

    Simple Move to Location won't replicate Rotation

    I can't get the client to see it's own rotation when it call the Simple Move to Location. The movement works, as well as animation, but not the rotation.

    Clients can see any other Client's character rotation and movement fine, as well as the Server's.
    The server can see all movement and rotation fine, including it's own.

    Hence I suspect the Client is overriding the rotation of it's own character, but I have no idea where it does that or how to prevent that from happening.
    The character have a camera set on itself in the blueprint if that mean anything.

    (Side issue, https://answers.unrealengine.com/questions/ask.html bugs out on selecting topic for me...)


    Click image for larger version

Name:	Custom Move.jpg
Views:	1
Size:	188.2 KB
ID:	1144091
    Click image for larger version

Name:	Simple Move.jpg
Views:	1
Size:	284.3 KB
ID:	1144092

    #2
    Do you have Replicates and Replicates Movement turned on? If so that should handle the rotation/location replication itself for clients.

    Also out of interest, what's the reasoning for using a Gate with Event Tick for the setting of the new position? Surely just a single mouse click can call that event on it's own? You might experience problems with throttling if you are sending out an RPC on tick, as that RPC will be called for every tick that the button is held down.

    Comment


      #3
      Where should I turn on replicates and replicates movement?

      Gate is used so that you can hold down the mousebutton and have the character follow the mousepointer around.
      Though, that could probably be solved differently using only the mouse pressed and released.

      Comment


        #4
        Ah I see, might be a good idea to add a short delay to that so the delay between RPC's is even

        Replicates and Replicates Movement can be turned on in the Blueprint under Defaults->Replication

        Comment


          #5
          Right, replicates and replicates movement is checked.
          I still need to run the function on the server, otherwise it don't seem to move at all.

          Comment


            #6
            Ugly workaround is to set a replicated rotation on server side, then have the client rotate the character manually every tick...
            I would prefer a better workaround, as that seems to make the client animation appear as walk, while the server portray it as running :P (As well as being an ugly hack...)

            Comment


              #7
              No other suggestions as to how this can be solved?
              Constantly updating a rotation variable manually cause lots of networking that shouldn't be necessary.

              Comment


                #8
                I know that this post is old, but this may help someone
                I have no need to replicate rotation so i calculate it client-side based on pawn velocity.
                http://i.imgur.com/3fQIfWP.png
                Click image for larger version

Name:	3fQIfWP.png
Views:	1
Size:	55.1 KB
ID:	1082511

                Comment

                Working...
                X