Download

Best way to move a pawn in the following scenario?

Hi.

I was wondering if anyone knew the best way to move a Pawn in the following scenario:

  1. Pawn - not Character
  2. A server (not UE server) sends the X,Y,Z location of the Pawn every second
  3. The Pawn should then smoothly update (move to) the latest position from the server

What I tried that worked the best was using AddMovementInput but that requires a movement vector, not a position. Is there a way to get the input vector from 2 location vectors? Say I have where the Pawn is currently, and where I need to go, can I make a Vector out of those two to supply to AddMovementInput? Or is there a better alternative?

Thank you.

You could use one of the various Lerp nodes to interpolate between the 2 positions.

Yes, the Get Unit Direction node does this.