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"

Sphere Overlap Actors yields inconsistent results

Hello fellow UE devs,

I am attempting to make a function in my Game Mode that returns an empty spawn point for a local multiplayer game, however for some reason the Sphere Overlap Actors node occasionally returns an empty actor list even when there are actors that would normally overlap.

alt text

The logic is to randomly select a PlayerStart and check if there are nearby actors until we find one that is not occupied, however the Sphere Overlap Actors node yields inconsistent results, which means occasionally my characters spawn inside each other and fly into the sky.

I have tried the 'find player start' node in BP and the 'choose player start' function in C++, as well as tried to use different overlap checks such as traces and box overlaps, tried turning off and on the actor class filter, playing with the collision settings of the character and probably a few other things and have reached a point where I no longer know what to do.

Could someone please confirm what I am doing wrong here? Or if not lodge this as a bug to be fixed and provide a workaround?

Thank you :)

Product Version: Not Selected
more ▼

asked Apr 08 '15 at 09:53 AM in Blueprint Scripting

avatar image

278 16 23 30

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

1 answer: sort voted first

To anyone else having a similar problem, this was occuring because 'get actor location' was not part of the execution chain due to being a pure node, and hence was generating a new random number and possibly a new actor when checking the overlap and setting the return value.

To fix this the randomly chosen location is now stored in a local variable for each loop instead :)

more ▼

answered Apr 09 '15 at 01:06 PM

avatar image

278 16 23 30

(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