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"

How would I teleport an actor to a random spot on the ground?

So as a first game to create, I thought it would be fun to try to recreate the horror game "Slender". If any of you have seen it, you would know how the slenderman teleports randomly around the character. I think I could figure out how to do this, but what i'm asking is how would I be able to teleport it, and then snap it onto the ground? Since my map has bumps, if I just set the location to be a random spot around my character, I don't want it to get stuck in the ground or be hovering in the air. Any help would be appreciated! Thanks!

Product Version: Not Selected
more ▼

asked Jan 29 '15 at 07:01 AM in Blueprint Scripting

avatar image

31 6 9 10

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

1 answer: sort voted first

You can do a line trace.

What a (single line trace by objects in this case) is doing is simply trying to draw a line from a start point to an end point. You can get a random point around your character, add the highest your ground will ever be (for example 2k or something) to it, plug that into start and then subtract another 500-1k from it as end point.

You will receive a hit result with the location where the trace hit onto something. If you do it by objects you can define what should be hit (for example ignore trees / leaves while still coliding with other environment stuff.

I hope this helps.


more ▼

answered Jan 29 '15 at 02:18 PM

avatar image

5.9k 291 86 293

avatar image Mxeaez Jan 29 '15 at 05:02 PM

Thanks for the reply! I'll look up line traces and post back to let you know how it goes.

(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