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"

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?

Product Version: UE 4.15
Tags:
more ▼

asked Aug 19 '17 at 11:18 PM in Blueprint Scripting

avatar image

JJGG117
28 4 7 11

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

2 answers: sort voted first

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.

more ▼

answered Aug 19 '17 at 11:39 PM

avatar image

cmarston74
296 6 7 10

avatar image cmarston74 Aug 20 '17 at 12:05 AM

I'm not even bear my computer right now.

avatar image cmarston74 Aug 20 '17 at 12:16 AM

Absolutely. What is it your trying to achieve?

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

It tried to mimonize the minimum and maximum from any one player. You could weight it to be more or less blind pretty easily.

more ▼

answered Aug 22 '17 at 12:01 AM

avatar image

cmarston74
296 6 7 10

(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