Spawn Outside of View of All Players?
I'm trying to spawn a mesh a certain distance away from ALL PLAYERS.
The distance is specific, it's basically set to the view distance of a player. Let's say float = 5000?
I have working a line trace so that the Z coordinate of the spawn is correct to the elevation of the ground.
But how do I know if the spawn position is outside (the view distance of a player) the view of all players on a map?
You'll have to look through all players, get their pawn location and subtract your desired location. The length of the vector is the distance from the character to your desired location. To get a point outside of all the players you'll need to repeat this process until the vector length is greater than all your minimum distance for all players.
And easier method would probably be to pick a spot on the map to place a marker and use its position to spawn your mesh. But of your using dynamic spawn points the you'll have to use the above method of procedurally selecting a point.
answered Aug 19 '17 at 11:39 PM
It tried to mimonize the minimum and maximum from any one player. You could weight it to be more or less blind pretty easily.
answered Aug 22 '17 at 12:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here