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"

How would I go about checking to see if the ground under a building is flat enough.

I need some help determining if the ground is flat enough for a building to be placed on (RTS style). I would appreciate any help.

Product Version: Not Selected
Tags:
more ▼

asked Sep 27 '14 at 03:49 AM in Blueprint Scripting

avatar image

Admiral Frijoles
48 2 3 9

avatar image Adam Davis STAFF Sep 27 '14 at 03:01 PM

Hi JGagner,

You can run a series of traces down from the building you are placing. (I would recommend 4 to 5 points, 1 for each corner and perhaps one in the middle for most standard buildings). If each point == the same vector you can place, if not you cannot.

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

1 answer: sort voted first

In the community rts template project which I use for my project it uses a trace, taking the hitresult and checking the "Impact Normal" how the slope is.

It only checks for the exact point where it is placed and since I'm using a grid placement this works perfectly well but you might want to do this for all corners as Adam commented.

Anyway to give you an idea of how it looks like, here is my current slope check setup:

alt text

Here we have the trace and the Hit result which go into a collapsed part (this is just a part of the code put into a kind of function which still is in the same graph technically but not visually anymore. If you have a lot of nodes it starts getting slower and taking quite a lot of time for each node placement and line you draw so it comes in quite handy).

alt text

From inside of this collapsed node the results go directly inside of the "Is Valid Build Location" function.

alt text

And here inside of this function is the actual check of how large the slope is.

It works quite well for my purpose.

1.png (135.8 kB)
3.png (158.9 kB)
2.png (137.2 kB)
more ▼

answered Sep 27 '14 at 03:15 PM

avatar image

Erasio
6k 291 86 293

avatar image Admiral Frijoles Sep 28 '14 at 04:47 AM

Thanks for the answer, this works reasonably well.

(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