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"

Actor spawn to nearest adjacent empty space

I am attempting to spawn an actor on the location of an other actor. The automatic adjustment in case of collision keeps adding that actor on top of the other actor. Is there any way that I can spawn the actor to an adjacent empty space on x or z?

Product Version: UE 4.12
Tags:
more ▼

asked Aug 02 '16 at 12:18 AM in Blueprint Scripting

avatar image

Micdhack
24 3 4 8

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

2 answers: sort voted first

There is a way that I managed to do this using a circle's circumference formula.

x = a+r*cos (d)

y = b+r*sin (d)

a and b are the coordinates that the existing object exists on the horizontal place. r is the radius that you want your object to spawn in relation to a and b. A random d between 0 and 360 will randomize the spawning process. Even the radius can be randomized within a range to create a more random effect.

more ▼

answered Aug 02 '16 at 05:08 PM

avatar image

Micdhack
24 3 4 8

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

I cant remember exactly what it is calked, but there is an option on the SpawnActor node that allows you to ignore collision when spawning.

The location you feed into it will be where it spawns so just adjust that variable.

more ▼

answered Aug 02 '16 at 12:39 AM

avatar image

NoobsDeSroobs
2.7k 108 36 180

(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