So, for whatever reason, the game I am designing has an issue where whatever character possesses player 2 will start drifting on the X and Y axis even when there is no input command used.
I’ve dug into the controller class with AddMovementInput, ConsumeMovementInputBuffer, and GetPendingMovementInputVector. All of these are returning zero values, yet my character is still drifting side to side. Plus, none of the input axis commands are returning a non-zero value.
I have spent a lot of time trying to figure this out and have found a workaround that kind of works (manually setting the X and Y position based on the last tick), but this is imperfect and still doesn’t solve what is causing the character drift in the first place.
The controller is fine. Just tested the gamepad. Also, it doesn’t have an issue when the controller is assigned to Player 1 instead of Player 2.
Side Note: When I print the GetLastUpdateVelocity from the PlayerMovement component in the character animation bp it starts at zero and increases over time. But, this only occurs in whatever character is possessed as Player 2, not Player 1. If I switch the character assigned to player 2 it still only affects Player 2.
Now, you might think it might be something in the character blueprint or animation blueprint that is causing the issue. But, again I tested this by using the same character for Player 1 and Player 2, and again only Player 2 is affected.
One of the workarounds I have discovered is to manually set the movement mode inside of the character C++ class, but again this requires a lot of extra effort for an imperfect result.