Sorry, your project did not help. But I set the max draw distance of the enemies in my game to almost unlimited (1.5 km) and turned off the 3D grass, and something has been clarified! There are some circles of the certain radius, and when the player enters each of them, one phantom disappears and one actual enemy becomes visible. But these circles are not linked neither with phantom locations nor with actual enemy locations. Also I don’t know whether these circles are static or movable. If I select an enemy in the debugger with the selected client world, it does not move if I didn’t enter that circle and moves otherwise. Probably those phantoms are just enemies that somewhy “sleep” on client until I “awaken” them by entering their “responsibility field”. Is it possible?
The parameter Net Cull Distance Squared and Net Dormancy are the the main variables that control when a network actor is relevant.
Not sure about your circles. They may be some sort actor that has a sphere volume that acts as a trigger.
If you using AI perception with your enemies then perhaps that’s the sight radius. (are the circles green?)
Show a screenshot of these circles if it’s to be narrowed down.
So, what to do with them?
These circles are not linked to enemy’s location (or maybe very far from it).
No, they aren’t green. These circles are completely invisible. I don’t even know are they static or movable.
I have experimented with the “Net Dormancy” and “Net Cull Distance Squared” and the first variable is probably for the other purposes (setting to “Never” did not help), but setting the second one to the greater value “awakens” the enemies still on the way to them. But what to do with the enemies that walk all over the world (except the “safe zones” around the cities) and can be located many kilometers far from their starting position? If I square those many kilometers, will such gigantic values be valid for “Net Cull Distance Squared”? Won’t there be some kind of overflow? Or won’t rounding errors do something awful? Who knows?
What is the point of animating enemies on the other side of the map? You only need them to be relevant in the area where you can see them.
If you want to manage enemy movement on the entire map even when they are out of sight you would need some type of manager to handle with decoupled from the enemy themselves. This type of system would only be needed for instance to track the population in a city builder, nor for random enemies.
If you can’t see them off in the distance they might as well not exist.
Only replicate actors around your players, the rest should go to sleep and become irrelevant if off in the distance out of the net cull distance.
Of course, drawing the enemies is culled by distance and they are not animated. But if there is culled replication near the zone or inside it, the player sees above-mentioned phantoms in the places where there aren’t be actual enemies. I think just noticing that the enemy is in the certain place - does not consume much computer resources?
Ok so i can confirm that the tick add movement input is also effected by “auto posses ai” If it’s just placed in world and I spawn an enemy through spawn actor from class it stays frozen in place unable to move.
This is with reduced network culling (so they cull faster / after shorter distance from player)
No freezing or phantoms / stuck enemies.
They pop in and out of existence on the client depending on if they are in range. Server always has full count.
Are you sure you are not spawning the enemies via blueprints with them having ai possession only set to place in world?
No, setting “Auto Possess AI” does not help, only setting “Net Cull Distance Squared” does. Thank you for the answers. Good luck!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.