x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Multiplayer pawn movement issue, help please!

Hello everyone i am working on rolling template and i modified to be multiplayer project and i have issue with client movement response.

when the client move it's have some of lag or delay i tried 14 different way to move the pawn on multiplayer and it's all have some sort of lag.

i couldn't figure out how to solve this problem.

my best way to do this movement:

1-Input event execute.

2-Get torque value of the ball roll based on axis value.

3-Check if this machine server/client.

a) If server:

1- Roll the ball by torque value.

b) If client:

1- Send to the server the torque value.

2- Roll the ball by torque value (on client side).

3- Roll client ball by his torque value (on server side).

and these pictures on the pawn BP class describe how to this work:

Move Right/Left

https://drive.google.com/file/d/1buI19uE4RFVMgM17cQjJual8SmlC4Z6z/view

Move Forward/Backward

https://drive.google.com/file/d/1w-_4yodV7Vh-A0wfqcCHvzR60ef9RIby/view

this problem disrupt me from working

can any one help me please!!!

Product Version: UE 4.18
Tags:
more ▼

asked Apr 09 '18 at 04:07 PM in Blueprint Scripting

avatar image

AKRM1
1 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

If it is using physics then you should only apply the torque on the server.

(The blueprints you tried to include aren't showing up)

more ▼

answered Apr 09 '18 at 04:12 PM

avatar image

Jin_VE
4.4k 32 77 40

avatar image AKRM1 Apr 09 '18 at 04:21 PM

yeh sorry now screen shots work. if you mean just send the torque value to the server and let him do his work and skip rolling the ball on client side i tried this and not work.

avatar image Jin_VE Apr 09 '18 at 04:48 PM

The SwitchHasAuthority nodes don't help there. The input is only received on the client. Just move the lines going into the SwitchHasAuthority over to the ServerMove nodes. If it doesn't move the ball on the client then make sure you have Replicates and ReplicateMovement enabled. And if you call TorqueBall on the client then you will see jerky movement because the client and server are both controlling the ball. With a character, the movement component takes care of the synchronization. With physics actors, there is only a basic mechanism that tries to keep the client matched with the server.

avatar image Jin_VE Apr 09 '18 at 04:57 PM

This thread has some interesting info. I have made pawns that use physics and it works fine but most there agree that you should fake it yourself. IMO though, letting UE4 handle the replication is a better place to start out making your game. You can always go back and replace it with something more efficient.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question