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.
asked Sep 27 '14 at 03:49 AM in Blueprint Scripting
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:
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).
From inside of this collapsed node the results go directly inside of the "Is Valid Build Location" function.
And here inside of this function is the actual check of how large the slope is.
It works quite well for my purpose.
answered Sep 27 '14 at 03:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here