Dont step on water

I want to block characters so they cant step on / walk over the water. Marking dont allow to step on, does not work.

Alternative I can make a lot of blocking volumes, but the landscape/lakes/oceans are not nice squares, so it would take a lot of time to set up.

Is there any other way?

Is it ok to bump after some time…?

ok, assuming you have your water on just a large plane that intersects with the landscape and not actual meshes built to the right shape. fastest way and least effort i can think of is to take a top down screenshot of the water, take that into 3d program and use as an image plain. use it as a guide to build a proper mesh. make it as simple as possible and make sure it is higher than the player. import to ue4, place over the top of lakes, set to not visible in game. now open the mesh and set use complex as simple.

this works great for simple stuff that has awkward shapes without having to create custom collision

welcome to game dev 101 :smiley:


I like ixicalibur’s suggestion, because you know with the right care, its going to work. But what if it doesn’t line up well enough… Or the landscape is huge, so it means taking multiple screenshots, and tiling those perfectly to match the original is a PITA etc…

  1. Research Physical-Materials. These have been around forever, and allow a Character to change their footstep sound upon stepping into a section of water or mud or grass or rock on a landscape etc. If you can trap that event, you can catch the Character as they take a step into shallow water preventing them from going further, which is a common technique used in games.

  2. Was going to mention Invisible Meshes too, but a little different from ixicalibur’s suggestion: Still some work to get right, but far easier than trying to align multiple blocking volumes. If there’s some uniformity to the landscape you can use a hybrid solution. Overlay standard meshes (which can be merged later) along with Nate’s Mesh Tool, to cut out meshes that you don’t have perfect fits for… This might seem like a lot of work, but actually the trick is to find 5-10 flexible meshes in Content Browser that offer flexibility, and then just lay them down quickly.

  3. Do a trace to the ground before letting the character move. If the Trace hits the landscape then prevent the move using Gates prefixing the Character Input / Movement event. This is the easiest to get working and perhaps the most reliable, it all just depends. To start, you need to be confident calc’ing the step the Player is about to take… Which in Pawn is easy as you’re always calc’ing specific movements or impulses. But in Character with the Character-Movement-Component, it may take a little more work because the complexity is masked / hidden by Add-Movement-Input iirc. But its still possible to guesstimate with a bit of tweaking, and then you can manage sharp edges around water / land etc.

In case anyone else comes looking here: Add a navigation modifier component to your water BP. The default settings should work. Make sure the area class is set to Null. Then rebuild navigation. By pressing “P” in the editor, you should be able to view navigation-able areas. The water covered areas should no longer appear green, nor should they be red. They will null all navigation in the overlapped area, as far as I know. Hope this helps someone.