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.