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"

Net cull deleting actor for no reason

I have a player pawn that acts as a camera for the client. I then spawn a player character on the server and possess it with a AI controller on the server. A player controller on the client side takes input and sends a location to the AI controller which then moves the character on the server. The problem is that the net cull is deleting the character assigned to the player even though the camera is following it unless I set the character as always relevant.

Product Version: UE Github Master branch
more ▼

asked Aug 07 '18 at 05:54 AM in Blueprint Scripting

avatar image

166 13 19 32

avatar image dZh0 Aug 07 '18 at 08:04 AM

Does setting bAlwaysRelevant = true fixes the problem? This will always replicate the character on all clients so it might be an overkill.

What is the character's network role? Simulated, Autonomous or Authority?

What is your AActor::NetCullDistanceSquared and can you increase it?

What is your player pawn? Your player obviously does not possess the character but why?

avatar image Althaen Aug 07 '18 at 09:38 AM

If I set always relevant or increase the netcull distance it does fix it but I don't want to have them set. The player pawn is just an empty pawn with a camera. I cannot use an AI controller to move my character when I click because I need a normal controller to take input. So my player controller has to tell the AI to move the character instead.

avatar image dZh0 Aug 07 '18 at 02:15 PM

Ok. So your game is some kind of strategy...

When you move your pawn closer to the unit does it appear again?

My suggestion is to move your player pawn with your camera so it always remains in the center of the screen. (I suspect you already do this)

Set your netcull distance to encapsulate all characters that can be on your screen (depending on zoom) + maximum unit range so you can visualize the effects of a unit shooting from outside the screen.

avatar image Althaen Aug 07 '18 at 11:18 PM

I have the camera attached to the pawn that updates its position on tick. Shouldn't the camera move with it already? The net cull seems to be calculating from the world origin where I spawn everything.

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

1 answer: sort voted first

The problem was that I was updating the camera only on the client.

more ▼

answered Aug 08 '18 at 11:21 AM

avatar image

166 13 19 32

(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