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"

Jerky projectile movement on clients

As discussed here:

https://forums.unrealengine.com/showthread.php?78270-jerky-projectile-movement-on-client

Client projectiles were moving jerkily, whereas the server projectiles worked fine. Specifically happened more often when more projectiles were in the scene, or when they bounced. Had to implement this blueprint in the projectile object to make it constantly update client machines.

alt text

Product Version: UE 4.8
Tags:
capture.jpg (54.9 kB)
more ▼

asked Jul 30 '15 at 01:09 PM in Bug Reports

avatar image

RussEarwaker
16 1 4 5

avatar image Ben Halliday STAFF Jul 30 '15 at 07:24 PM

Hi Russ,

I can't seem to reproduce any jerky projectile movement on my end here. Can you send along a test project with which this happens? You can upload it somewhere like Dropbox or Google Drive and get me a download link, if it's too big to attach here. Thanks!

avatar image Ben Halliday STAFF Aug 04 '15 at 04:52 PM

Hey Russ,

We haven't heard back from you in a while, so I'm resolving this post for now. If you're still having trouble with jerky projectile movement on the Client, please feel free to respond with the information requested above and we can continue investigating. Thanks!

avatar image RussEarwaker Sep 20 '15 at 12:27 PM

Hi, so, still having problems here, sorry for not getting back sooner, thought I'd fixed this by setting the projectile position manually, by getting it's location on the server each tick and firing it to all the clients. That quite understandably seems to have caused a silly amount of lag when there's lots of projectiles going on...

So, what i want to happen is; the player presses fire to spawn a turret, then the projectile is fired from that turret

I'm triggering firing like this:

On the client: alt text

To an event on the server (reliable) alt text

Which does some checks and sends some info to the turret, to tell it to fire: alt text

The turret then fires: alt text

And the projectile should just do its job from there, as it has nothing attached to tick.

Here's the network settings for both the turret and projectile: alt text

I'm running in editor, with 2 multiplayer games running at the same time (1 server, 1 client)

Any ideas?

capture.png (97.5 kB)
capture2.png (47.2 kB)
capture3.png (163.8 kB)
capture4.png (195.9 kB)
capture5.png (12.5 kB)
avatar image Ben Halliday STAFF Sep 21 '15 at 09:54 PM

My guess without seeing the project is that this has something to do with calculations being run on the projectile at spawn, since it appears you are setting a number of variables on spawn and these are probably being used immediately. It would be helpful to see this in a test project. Are you able to reproduce this in a new project, or only your current project? If in a new project, would you upload it someplace like Dropbox or Google Drive and get me a link? Thanks!

avatar image RussEarwaker Sep 22 '15 at 06:48 PM

Here's a link to the dropbox folder - i'm getting the problem when running in editor, 2 multiplayer screens on the same PC.

https://www.dropbox.com/sh/hvf8au3uoz896s0/AAD1_eIOwQq1k5ryLlPI2yfLa?dl=0

email russ_earwaker@hotmail.com if there are problems

avatar image Ben Halliday STAFF Sep 22 '15 at 10:07 PM

Can you zip up the project before adding it to your Dropbox, please? It's too large for me to download unless it's zipped first. Thanks!

avatar image RussEarwaker Sep 22 '15 at 07:03 PM

Just removed everything from the projectile spawn apart from this:

alt text

so it can set the speed in construction script:

alt text

then getting the projectile and setting all the variables as before on that variable, and I'm still getting problems :/

capture.png (133.1 kB)
capture2.png (53.9 kB)
avatar image RussEarwaker Sep 23 '15 at 08:52 AM

Hey Ben,

First, thanks for the quick replies, really appreciate it, this thing has been driving me crazy for a while now!

I've added 2 new archives to the folder - one with and one without the starter content folder, in case the files are too big :)

https://www.dropbox.com/sh/hvf8au3uoz896s0/AAD1_eIOwQq1k5ryLlPI2yfLa?dl=0

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

1 answer: sort voted first

Hey Russ,

It looks like your projectile is doing a lot over the network. A useful tool for determining the load on the network is the Network Profiler. Run your game and use the console command, "netprofile" on the server, then fire the projectile a bunch. Exit Play and find the .nprof file for the session and open it in the standalone network profiler tool.

I did this for your game and compared it to a blank First Person Blueprint template project (with the projectile set to Replicates and Replicate Movement). The projectile on the FP project has a much lower profile on the network than the one in your project.

My suggestion would be to remove as much of the functionality as you can out of the projectile class itself, and instead call functions in other classes or from other classes as appropriate. If you place the projectile from the FP template in your project and spawn that instead, I think you'll notice the lag ceases.

Hope that helps!

more ▼

answered Sep 24 '15 at 06:19 PM

avatar image RussEarwaker Sep 26 '15 at 04:55 PM

Hey Ben,

On further investigation, you're right, creating a new blank projectile type seems to fix the problem. As info, when I tried to set the speed of the projectile within the projectile itself, the judderyness came back. Seems like if i set the initial speed with an a spawn variable and the construction script, or set the velocity with a message sent to the projectile, it gets all shivvery and confused. Setting the speed by getting the projectile movement component externally in the parent object seems to work fine though :)

Cheers again, Russ

(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