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"

Set location of a spawn actor so that it stands perfectly on the ground?


question is in the title. I need the BP solution :D

Thanks in advance :D

Product Version: Not Selected
more ▼

asked May 09 '15 at 04:11 PM in Blueprint Scripting

avatar image

662 62 54 116

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

1 answer: sort voted first

The BP solution is mostly here... https://answers.unrealengine.com/questions/72822/how-to-read-landscape-heightmap-at-runtime.html

Then you need to ge tthe Actor exactly on the ground. I just use a fudge factor to add a little to Z so they are a hair off the ground. Or add a bit mor and they fall for 0.5 seconds to the ground on spawn.


If there is an obstacle like a rock, building, etc on that spot then you have to get smarter about where you spawn. Thus there are Player Start points in Unreal that you place by hand.

You can also loop through the hit list in the BP solution and decide which surface has priority. Buildings are a problem because the roof may not be a good spawn point, so you search downard for a floor surface. And it can get very complex.

Another approach is to always spawn on open griound and do a random search within a rectangle of where you want to spawn. Maybe within +-50 meters. And limit your tries to maybe 50. If you can;t find a spot in 50 tries just spawn anyway 0.5 meters above the highest solve point so they fall to the roof/rock/tree/whatever.

more ▼

answered May 09 '15 at 08:00 PM

avatar image

SND R Keene
963 31 120 113

(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