I need to take control away from the Mover character in the GAS project and make it move to a specific point, and I’ve tried using loads of different ‘Move To’ variations, but none of them work.
Perhaps someone knows how to do this I thought it should be dead simple, so I must be missing something.
I don’t work with GASP, but generally for autonomous character movement, you need a navigation mesh and an AIController.
The AIController would temporarily possess the character, do the move on the nav mesh, then the player could re-possess the character to gain control back.
There’s a ton of tutorials out there to set up navigation mesh.
Have you tried the SimpleMoveToLocation or SimpleMovetoActor nodes? Dunno how well it works with the mover comp, but in an older project with ye olde character movement component, I used it often to make player chars walk over to a chair or whatevs before snapping them to it.
Have you tried runing the command outside of a gas ability on the char itself or something? Might be easier to figure out if problem is due to gas or mover.
Thanks, you’ve got me thinking. I’d already tried something similar, but I’ve just noticed that if I enter the game, press the button that triggers movement, and then quickly switch to a standard character based on ‘character movement’ rather than ‘mover’, it will run. But it still doesn’t work with the mover, and it gave the error ‘SimpleMove failed for PC_Sandbox_C_0: movement not allowed’.
Actually, I think I’ll sort this out soon; perhaps I’m not disabling the input correctly, as the mover uses physics and inertia.
I’ve not messed with mover really, so not sure what the problem is. Since it uses physics and stuff, the ai helper probably isn’t setup to inject the movements. In that case, disabling move input might not be enough, and you might need to temporarily posses the pawn with an ai controller as Danamaloma said. Does Epic have a topdown template project that uses mover? If so, may check that to see how they implemented click to move.
In the Mover Example Content dir, there’s a map called L_LayeredMoves. Open that map and check out the level blueprint. It does this to set and and queue a mover-based move to:
To everyone who’s posted here, thank you so much for your help; I’m sorry I’ve been so busy and haven’t been able to reply. @illspiritx, that actually looks like a really good approach. I’ve tried it out, but I think there’s still something that needs tweaking to make it work with walking, because if you don’t press the keys, it’ll just glide smoothly to the spot. But I’ll sort that out! Thanks, that’s really cool – where did you read about this node?
I found it by looking through all the example maps. Thats one has a demo section for movetos. The example pawn spawned from the map in play will do a walk anim during moveto if you press a direction. I’m guessing the mover moveto isn’t setting a move intent to use in anim bp.
Yep, layered moveto isn’t updating the move intent vector (dunno if bug or NYI), but a quick and dirty fix is to skip the move intent !=0 check in the anim bp. If you’re using an ABP based on the Manny example, just wire it like this until mover is updated:
Could break some state machine transitions if doing any fancy deceleration anims, but at least teh pawns won’t slide around like ice skating statues lol.
Dude, you’re a genius! Thanks a ton for the help. Diving into GASP and Mover is actually pretty fun, even though Mover is still experimental. It’s only gonna get better from here