Rebuild Landscape Collision?

Hi there,

I’m working on a map with a landscape in it. There are high cliffs on the sides of the map (the map is sort of a valley). I needed to add a path so I flattened part of one of the cliffs.

The problem is that while the terrain looks like it’s been flattened, the collision behaves as if the cliff is still there. is there away to rebuild the collision? I’ve exported the heightmap to a file and it looks as if the area is flattened. It’s definitely the Landscape because if I disable the collision, I can fly through the opening (our game doesn’t have gravity).

Any idea how I can fix this?

Thanks in advance.

Hi ,

Are you attempting to dynamically alter landscapes or is it not responding just in the editor? Does it still block after you build the level again?

It’s not responding in the editor.

We created a landscape and then tried to alter it in the editor by flattening a section. It seems that, while visually, the terrain has been lowered, the collision has not been altered.

We copied everything into a new empty level, rebuilt everything and it seemed to fix the problem.

Also, we had tried the Build button to rebuild everything after flattening the section in the original level, but that didn’t make any difference.
After copying to a new empty level there was no collision from the landscape at first until we hit the build button, then it created the collision properly so we could make it through the new path.

That is very curious, which version of the editor are you currently using?

We’re using 4.4.0

Hi ,

I attempted to reproduce this on my end but could not. Does this only occur with the one heightmap?

It seems to be only with this heightmap.

We’ve been working on this map since 4.2 and haven’t actually changed the topography until recently (4.4.0). It might just be a matter of working between the different versions.

Something else is that we have level streaming set up as well. It might have how something to do with working on multiple maps at the same time?

Although, when we copied everything into a new map and rebuilt everything, it worked properly (also when including it into the streaming level hiearchy).

I have had same issue and we alter the terrain quite a lot.

I have been able to fix it up till now but hte most recent case I am not able to fix it.

Past fixes

  1. resample the terrain
  2. delete and undelete the terrain component

Hi ,

Do you have the landscape streaming multiple times or do you have individual sections in other levels?

hi IronTaxi,

Have you been able to reproduce your error in a clean project with no additional content? Which version of the editor are you currently using? Additionally, are you using a heightmap as is or is it occurring with terrain tools and no heightmap? Thank you!

Hi .

Found a very obvious work around that never occurred to me.

  • Duplicate the terrain and delete the old one. It seems the duplication process rebuilds (or effectively builds) the terrain collision and rectifies the issues.

to answer your question.

  1. Have not tried to produce on clean map as it’s quite a random occurrence.
  2. Version is most current (sorry at work… 4.3?
  3. Using Heightmap generated via world machine to generate base map then sculpting manually. (so a combo)

Hi ,

We have separate landscapes for each of the streaming levels. We’ve tried editing the terrain again after copying the terrain into a new level and we’re not seeing the problem anymore.

It might be very hard to pinpoint exactly what’s causing it, but it looks like there are a couple of workarounds here that effectively fix the problem if we encounter it again.

Hi everyone,

I am happy to hear that you have found workarounds for your error. I will mark this as answered for now for tracking purposes. If this problem persists, please comment back with reproduction steps so I can attempt to recreate this on my end. Thank you!

Duplicating and deleting sounds like a good fix, however, I am not able to delete the landscape! I cannot edit it, I cannot move it, I cannot even delete it! (I can edit certain areas of the landscape, but not others) What can I do then…

Duplicate the landscape and delete the old one. And if you can’t delete it:

Initially I was not able to delete the landscape (situation explained below). The workaround for this was to select the bad landscape and change a few of its properties. I tried quite a few of them, but I suspect that the important one is among these:

  • Rename the landscape actor
  • Remove material from the landscape
  • Collision Mip Level: 3
  • Collision: NoCollision

If these tree don’t do the trick, try more of the settings. After changing the correct thing I was able to delete the landscape actor, and use the duplicated one from then on. (By the way, I noticed that the duplicate had miniature differences with the original, some tiny parts of the ground were shifted vertically or horizontally)

My situation:
At some point I was not able to edit my landscape anymore (smooth, sculpt, move the actor, delete the actor). I was able to edit certain parts of the landscape that were far away from the area I was generally working on. The crash log mentioned something about “instanced foliage”. I suspect this may have to do with the fact that I edited the collision shapes of one of the trees, minutes before having the crashing landscape problem. (not sure) So in effect every time I tried to edit my landscape, the whole UE4 editor crashed.

Unfortunately, I’ve the same problem with UE 5.3 as well, on below instance:
I tried to create a new landscape with reduced resolution (232x232 to 113x113) and so, the number of components reduced from 1084 to 64. I had to do that to reduce the draw calls, as the original landscape is heavy for mobile platforms.
WIth new landscape, I tried to reuse the heightmap & layers from the original landscape (by export / import). All went smooth, I could see my original landscape’s cliff / terrain on the new landscape - all ok, except the player collision. It still remembers the original landscape collision and player walks on the air this time :frowning:
Build all / landscape, etc… didn’t help.

I’m yet to try rebuild the project from scratch, will update.

Rush At Games / Roxroria (available on Steam)

Rebuild the project from scratch after deleting all old/unwanted landscapes solved the problem of player collision with new landscapes. Thanks.