How can I go about implementing a non-vertical Character with custom collisions and proper navigation?

Hi,

I would like to make a horizontal Character/NPC, something like a vehicle/tank.

After some research, it seems like the Character class in UE has its movement system tied to the Capsule Component (root).

I tried adding box/sphere collisions but they get ignored, only the capsule component collides with stuff.

I tried making a Pawn with its own movement and box collisions, everything worked up until navigation.

The navigation on the Pawn would ignore pathfinding and just run into walls.

What are my options?

Hey there @c0ldpr0xy! Welcome back to the community! So the character class is hardcoded to work with that collision capsule, and the nav system is built to accommodate the character class. So depending on your use case, you may want to create a composite pawn and handle the navigation on your own, or if your use case is hyper specific you may want to generate your own class that mimics the character class, but that gets to be far more work.

Thank you for answering. Could you point me in the right direction on how to achieve this? My case would be a vehicle driving around in a restricted 2D plane, no vertical axis.

So what I’d recommend if you really don’t want to use the character class, is significantly easier than learning how the navmesh source code works and trying to implement something with it. I’d recommend for just 2D planar pathfinding going with the tried and true A*! Some resources below with different methods, but the same goal.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Text rundown:

Video:

1 Like

Thank you. I’ll take a look at it and get back to you.

The video doesn’t explain exactly what’s happening. I understand it’s a grid system that can be used for navigation but not sure how exactly to achieve that. Think I’ll just shelf my project and come back when I figure out a solution.

The text writeup is honestly a bit better, but I understand it’s a good bit different from working with engine navigation. Alternatively, if you were using chaos Vehicles, there is a marketplace asset for Vehicle AI that shows off a rudimentary navigation system for vehicles. Below is a video of it being in action. (note this is not an endorsement, just an example)

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Thank you. I’m not using any vehicle template. It’s just a Pawn with a tank mesh that’s supposed to imitate a vehicle restricted to 2D plane.

I understand! Was just an example in that it does a bunch of sphere traces with some other logic to decide the basic movements of the vehicle. The general idea would be the same regardless of the movement itself.

Thank you for your time. Much appreciated.

1 Like