UE4 Landscape Displacement Collision

Hey guys, so im creating a landscape material that uses height maps to displace how much they get pushed out but ive come across an issue when i play in game. Ive got my height value quite high but the character just goes through the landscape. Its linked with other materials so others have the same issue

http://prntscr.com/cxhyt1

Material Shader: http://prnt.sc/cxhza8

Is there a workaround this?

If you select your landscape, there is Checkbox for “Bake Material Offset Into Collision”. This is what you are looking for.

Still has the same issues. Does that option dynamically update if i change the height value?

Dynamically? No.

Ahh too bad, but the landscape still ignores the character and just goes through the floor.

Bump Bump, Anyone got any ideas?

Static: bake

Dynamic: You’d probably have to extend the landscape object to have an API for returning the displacement at coords, and pass that to your movement component.

This still doesnt give me a solution to my collision issue.

Regret to inform You,but there is no readily available solution. Consider either fitting within constraints or, like Dodgin suggested, improve landscape collision functionality yourself.

So whats the point of having it in engine if it clearly doesnt work?

Uh, it’s not so much a case of ‘it doesn’t work’ as much as, ‘it was never intended to work that way’.

Landscapes make use of a bunch of lighting hacks and tricks to get their awesome detail, and this means that their pipeline in the engine is pretty restricted. Getting the landscapes to have dynamic collision would require building from source and messing with the core engine code. Thanks but no thanks.

However, recently with the invaluable work of koderz’ plugin that improves and expands the Procedural Mesh Component functionality, it is possible to have your own terrain that changes over time with collision calculated on the fly. (Check out Runtime Mesh Component)

This is what I used as a template for my terrain generation, and it’s multithreaded for even more efficiency.