Hopefully a simple question. I started with the Top-Down template and I’d like to switch it over to use the Mover plugin. How exactly do I set this up? For the ThirdPerson template it’s pretty straightforward, but I’m having trouble Top-Down.
Added both the CharacterMover and NavMover component.
Added the NavWalking movement mode to CharacterMover.
Ticked CanWalk in NavMover.
I’m using QueueNextMovementMode to set the movement mode to NavWalking.
Added the ProduceInput interface.
Set up MakeMoverInputCmdContext. SetDirectionInput reads the result of GetUnitDirection(Vector) from the default Follow function in the controller BP.
Confirmed that GetUnitDirection(Vector) is a valid vector.
Confirmed there’s navmesh under the character.
Character just stands still. Again, I’ve tried setting this up for ThirdPerson template. No problems. Basically the only difference between them is the input for SetDirectionInput because I’m using SimpleMoveToLocation instead of WASD input, and also I didn’t add NavMover to ThirdPerson.
Moving from the traditional Character Movement Component (CMC) to the new Mover plugin (particularly Top-Down) can be tricky to deal with as Mover handles movement intention and pathing differently then the standard setup
Based on what I can tell from your setup:
SimpleMoveToLocation vs. Mover Pathfinding
Standard AI/Top-Down functions such as SimpleMoveToLocation or AI MoveTo normally utilize the internal CMC path-following component. With Mover, pathfinding is to be explicitly piped into Movers input pipeline (or with NavMoverComponent in combination with AI Controllers/PathFollowing)
Direction Input in Top-Down
Setting SetDirectionInput with GetUnitDirection only sets a single direction vector for a frame (unless your controller is constantly updating CachedMoveInputIntent or feeding in target path nodes into Movers ProduceInput on every tick.
A couple of things we could try:
Check NavMoverComponent Integration
if you’re using AIController + SimpleMoveToLocation the controller may expect that your character movement component is recognized as a NavMoverComponent.
While Mover NavMoverComponent provides pathfinding support, common practice for player controllers which utilize a click-to-move UI is to attach a PathFollowingComponent to the Controller itself so that it can generate the necessary directional inputs for the character to follow on a per-frame basis
Testing through MoverExamples Pathfinding level
Epic has a dedicated pathfinding level in the official Mover Examples plugin named L_PathfindingMovement.
I would suggest looking into how PathFollowingMannyPawn or MoverExampleCharacter pass navigation data into ProduceInput.
Before getting into the details about what’s going on with the Blueprint nodes, Could you answer a couple of questions for me to help narrow it down?
Are you using a PlayerController and calling MoveToLocation or are you using an AIController to move the pawn?
In your ProduceInput event, are you passing the movement input as a vector or are you sending a click event to set the movement intent?