Set Velocity of Pawn Movement Component Not Working

Very simple issue as shown in the function in the picture. I am solely trying to set a Pawn’s Movement Component’s Velocity, which is not working whatsoever.

I’m really lost, as the expected outcome is that the resulting velocity vector will move the pawn. However, it does not.

What is more confusing is that if I set velocity from the controller of the pawn I use for the player itself, setting velocity does work as expected.

I can not use movement input as I am using a Socket.io server to replicate the velocity of one client’s pawn to another. I need to be able to set the velocity from functions within the pawn.

An tips to debug this issue?

Check to see if the targeted pawn has anything else setting its movement velocity, particularly in its own code. If its velocity is being set in an On Tick function either by itself or its Controller, it’s liable to override the velocity you’re setting for it.

Just checked, and nothing is overriding the velocity. Also, for each client, the pawns that represent peers have no controller. Could it be this lack of a controller that is causing my issues?

Simple answer is: a Movement Component will have no control over the pawn it is attached to unless the pawn has an associated Controller (whether player controller or AI controller).

I’m unsure the reason why a Controller is required, or where the documentation would be that specifies this requirement, but this was my solution, as my Pawns had no controllers when I was giving the Movement Component a velocity.

I want to add that I just ran into a similar problem where a Floating Pawn Movement Component would not move my spawned pawns. All I had to do was to set “Auto Possess AI” to “Placed in World or Spawned” in the default settings of my pawn class, so that the pawn would have a controller.

Maybe I was overlooking something but something like this should be mentioned in the docs.