Well the main problem is I’m getting confused about what actually goes into the end on that. I’ve watched some trace tuts and if you keep the start and end the same it should trace a sphere around it. But it needs some sort of number to sweep, correct?
Cause if my landscape is 100% flat I don’t need to check the z by 2000? Shouldn’t it just be the x,y?
My objects are set to block everything except the camera, visibility and landscape I have a custom channel called “resources” that the trees are a part of(resource blocks other resource).
And I’m reluctant to use the trace by channel because I need these things to not block camera, visibility or landscape.
The box extent does not matter. Origin Z has to be above ground. And you need to subtract not add.
Cause if my landscape is 100% flat I
don’t need to check the z by 2000?
Completely irrelevant. It’s the direction of the trace, you’re tracing upwards. if you wanted to hit a cloud above you, it’d be fine…
And I’m reluctant to use the trace by
channel because I need these things to
not block camera, visibility or
landscape.
Not sure what it has to do with anything
Your current setup should not be working correctly at all. You place a sphere at the ground, it hits the ground. So it should be a fine to spawn something there but it isn’t because something might be just above the ground like a previously spawned tree. That’s why you want to have a trace come from the top and clear the area - if the trace is able to reach the ground from the top, it means there’s nothing blocking it and you can spawn an object.
Essentially, you place the trace beginning in the ground so it’s always hitting the ground - what’s the point of doing that?
Okay that seems to work but now the
cubes are randomly on the z? Like ±
200 maybe?
Can you show the trace BP? You’re most likely randomsing Box Extent Z - it should be set to 0. Not sure why my BP shows 1, which is fine, for as long as it’s not random and the trace is long enough.
You can always set the subtract value much higher to something like 10k to make sure it always reaches the ground. Unnecessary brute force but is should suffice.
Ah, makes perfect sense. Instead of Hit Location, Use Impact Point. Currently it’s giving you the centre of the sphere and the red dot is the Impact point.
You should end up with the cubes half embedded in the ground. If your trees have correctly set up pivots (at the base), you should be golden.
If their pivots are in the centre (which is often the default - depends on how you set it up in the modelling app), you can add half the tree Z height to the Impact Point. But, ideally, the trees should have the pivot at their base.