More Documentation on NavMovement / Avoidance / PawnMovement Components.

I’ve created a custom movement component based on UPawnMovementComponent for my game. It uses Physics (Linear Velocity and Angular Velocity) to control and move the object it’s controlling.

I’m now trying to put together some simple AI, at least something that can make the object travel to a point on the map using the NavMesh. I’ve been digging through code for hours now trying to find out exactly how a nav component tells a movement component where it’s meant to go, and more importantly HOW to get there. There isn’t really any documentation on creating custom movement components outside of modifying UCharacterMovementComponent - which isn’t much use to me in this scenario. I tried looking in UWheeledVehicleMovementComponent since it’s a much smaller class, but even that has no obvious evidence of the AI telling it how to move the vehicle.

I’m also not entirely sure what components I need to make all this happen. The only thing I can find that’s close, is setting ‘RequestedVelocity’ in the Character Movement Component, which I assume is a unit-length vector in the direction of the target location, but there’s no description of it anywhere. It also still doesn’t tell the movement component how it’s supposed to work. I.E. it doesn’t talk to the input functions at all.

So yeah, some more documentation on how we’re supposed to tie in custom movement components with the navigation system and AI would be super-useful - or even a blog post of some kind.

A personal anecdote that may or may not help you is an issue I’ve had a few months back
… I made a horse from ACharacter and it had its own custom movement and input handling with a long slowdown and slow acceleration. The AIController ignored all of that while telling it where to go and it behaved just like a normal character.

That’s pretty much what I’m worried about. I can’t see any evidence of the Nav system talking to the input, so it’s currently looking like I have to skip nav-mesh altogether and write my own somewhat expensive pathing code. Something I probably can’t do all that well either…