My projectiles are destroyed or not spawning at a certain distance from the center of map. How can I prevent this?

I have a space sim project and some fairly large distances are involved. Several kilometers. Ships fly at around 700km/h at top speed, so you can rather quickly cover some ground. The distance required to set off the unwanted effect is not in the 100’s of kilometers though; it’s significantly less, like 10Km.

What happens is this:
I fly away from the center of the map. The direction does not seem to matter. After a certain distance of around 10Km (less than 14Km), projectiles are either refusing to spawn or are destroyed instantly after spawning. I get their sound effects and muzzle flash, but the projectiles themselves aren’t there. If I fly back towards the center of the map, they start working again as normal.

I have tried adjusting the weapon sockets, in case they were spawning inside the ship, due to lack of precision. Didn’t work. It would not have made much sense if this helped, as the loss of precision would only be on the scale of a few cm.

I have tried adjusting the Net Cull Distance Squared value. Didn’t work. Also, should not have worked as that is relative to the camera and the distance between the projectile origin and the camera remains fixed.

Is there a default volume or something that I am not aware of, which might cause this behavior?

Any ideas as to what might be causing this?

Thanks in advance! :slight_smile:

UPDATE:
I found an answer in a thread about map size and was able to resolve for my purposes.
Under the World Settings there is a World tab. Here, if you further expand the tab at the bottom, you will find something called Enable World Bounds Check. My shots were failing this check and once this was unchecked, I could spawn shots all over.

1 Like

You can’t have a single map of that size in UE4. Once you go beyond 5km from world origin, things get shaky. Floating point precision errors adds up, physics simulation becomes unstable and actors can no longer spawn. Spawning an actor 10 000 000 uus (10km) from the world centre is a no-no.

World Composition can glue maps together into a larger whole, but I don’t think that’s what you’re after here.


First of all, reduce the scale of the world by an order of magnitude. No one needs to know that your starfighter is actually 3m long rather than 30m, providing everything else is scaled down. All off a sudden you have 10x more space to play with.

In addition, look into World Origin Shifting - mentioned in the link above. In short, you take the entire World and move it around so it’s centred on you. If you were 5km from world origin before, you’re at 0,0,0 after the shift, everything else moves accordingly and you get your precision back.

Thanks!

I was not aware that it affected spawning actors.

I can definitely try scaling it back down and that seems like it would solve it, as it is 100% reproducible. We did do that earlier on, but it didn’t feel like it was working well with conveying a sense of movement and acceleration.

Not sure that origin shifting will help, as it’s not single player.

If world composition would allow me to shoot people who are on another map that could perhaps work. Otherwise it would be really weird around the borders of two maps.

thank you so much. You saved me