I’m making a click to move adventure and I want to be able to support WASD movement as well. This involves using an AIController
to utilize pathfinding and replicate the pawn’s movement. The method below works pretty well for one directional movement, but it won’t move diagonally since it is only handling one Simple Move To Location
at a time. ie if both A
and W
are pressed at the same time, one of them gets overridden. Any ideas or resources for handling both inputs at the same time to move diagonally?
Here’s how I got it to work:
Set a variable they share and a boolean if the axis is not zero (being pressed). If the other axis is being pressed, take the value from the variable they share. Otherwise just use the value from the actor.