Actors doesn't want to spawn on a Landscape

So I got a landscape setup with a working, built navmesh. From what I can see the landscapes collision is set to Block all.
But when I try to spawn a few groups of NPCs on top of it nothing happens.

I’m using the following script to spawn them, based inputs from an object placed in the world (in a valid spot above the landscape)

This works fine if I spawn them in my test area where the ground is just a big flat box. But if I move it over to the landscape it’s just a big “Nope!”

Any ideas of where I should look?

You could debug the Return Value on LineTraceByChannel
Print String would show True or False
If this is false over the terrain then it is not providing good values for the break hit node
If this is true over terrain then try adding positive Z offset to BreakNodes Location wire so you are not to low on your spawn

1 Like

Tried both.
The print come out as true.
And the line trace debug view shows this
image
So it should get a valid location from the trace.

I’ve also tried to offset the Z-value with both 50 and 100 units, but without any success.

EDIT:
Did a new try where I added a Block to the area where I want to spawn them, but the result is the same. No actors spawned (Tried with both an offset of 0 and 100)

EDIT2:
The rotation casued some issues.
But there’s something with the terrain causing the real issue.
If I raised the block a few meters into the air the squad spawning there spawn just fine.
image
And If I lower the block so it is more or less level with the terrain, the same squad doesn’t spawn in.

The Pawns won’t spawn if they’re already colliding with something. Landscape collision isn’t always exact so the actors are most likely accidentally colliding with the landscape which means they won’t spawn. That SpawnAIFromClass node has that bool “NoCollisionFail”. Check that and they should spawn regardless of colliding or not. Hope that works.

1 Like

I’ve tried having “NoCollisionFail” both on and off, but neither works. And since the squadon the block fails when it is close to the ground, but spawns if I rise the block up a bit.
Could it be any volume or something I’m missing?

And If I look at the Collision view


I can’t really see anything that would make it fail either

And the navemsh looks good.

Alright. New test. Copy pasted squad spawn and box. No changes to the script. Clearly there’s something I’m missing in the level.


image

If the squadspawn ends up below -1000 units in z it seem to stop working.

OH! I think I actually know this time lol (Sorry my last suggestion was lame).

So in the World Settings, there is a property called “Kill Z”. Anything below the kill z value will be “killed” off. In your editor, go to Window >> World Settings and make sure its displayed. It is usually found over on the right under the world outliner. If you set it to the default (-1048575.0) you should hopefully be rid of this issue.

1 Like

Yes that did it! Thank you very much!

Once again UE baffels me with strange limitations.

Awesome. Glad that helped.