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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Actor Not Replicating When Network Relevant

Here's the situation.

On the server, I spawn an actor into the world. The actor replicates to the client without a problem and appears on all client.

The client then moves away from the spawned actor, outside of its network relevancy. The spawned actor is then destroyed on the client, which I believe is what is supposed to happen... so far so good.

The client then returns to the location of the spawned actor, but its not there. The server can still see it, but it is no longer there for the client even though the client has returned back to within its network relevancy.

Why does the server stop replicating the actor to the client like this and does not respawn the actor on the client when the client returns back within network relevancy?

Product Version: UE 4.10
Tags:
more ▼

asked Nov 13 '15 at 03:50 AM in Using UE4

avatar image

wilberolive
298 29 45 48

avatar image wilberolive Nov 13 '15 at 04:12 AM

After some more testing... it seems as though the network relevancy stops working entirely if you set the Net Cull Distance Squared on the actor too small. I was setting it to 225000.0 just for testing and that seems to cause it to go buggy and stop working.

avatar image RCowsill Jan 22 '16 at 04:05 PM

There's a fix in UE4.11 preview for a bug in the NetCullDistanceSquared relevancy test which might be causing this problem.

In UE4.8 to UE4.10 the server was testing the distance from the actor to the origin instead of the distance from the actor to the client character on every other tick.

The fix is at the bottom of FNetViewer::FNetViewer(UNetConnection*, float).

avatar image wilberolive Nov 13 '15 at 04:16 AM

Oh I also noticed another problem. I spawn an actor (a weapon) into the world from a character's Begin Play event (just on the ground in front of the character), but I use a Switch Has Authority, so that only the server will spawn it in. However, the network relevancy on this weapon actor seems to have no bearing on the ones spawned for the client characters. The one spawned for the server's character will disappear as expected when a client gets too far away, however the one spawned for the client character never disappears if the client gets too far away from it. I have made sure to clear the Owner of the actor, so the client doesn't actually own it, but that makes no difference.

avatar image wilberolive Nov 13 '15 at 04:39 AM

In fact, I've also noticed that if I place the weapon actor into the level manually, then it remains network relevant to the client permanently. It doesn't matter how far away the client gets, even when I go well out of its network relevancy cull distance, it is never destroyed on the client???

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey i had the same problem, i dont think this is efficient, but setting Always Relevant to true in the actor class fixed this for me. Try it out for now!

more ▼

answered Feb 18 '16 at 07:49 PM

avatar image

sonnyday_
81 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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