Basic movement impeded by unknown force

Hi!

Im a newbie to unreal engine so bear with me if this is a silly question, and if its one thats been already answered please link me to it because I cant find anything anywhere.

So what is the problem you so kindly ask? Well, I was following a youtube tutorial on how to make a third person shooter. When I got to the steps involving adding animation to the player actor, the movement began behaving really really weird. Whenever I use animations the following happens:

-d takes me true left and rotates the character/camera to -90 degrees.
-a takes me true right and rotates the camera/character to face -270 degrees.
-w takes me forward but rotates the camera/character to face 0 degrees.
-s takes me backwards but rotates the camera/character to face -180 degrees.

Here are some pictures of key aspects of my code:

Additionally, you may suspect that the culprit is the “orient rotation to to movement” option under the character movement component like I did. Well this guy adds a little spice to it. When its turned on the camera and movement system acts as I described it above, however, when its turned off:

-d takes me true left and does not rotate the character/camera.
-a drags me backwards and to the left and does not rotate the camera/character.
-w drags me backwards and a little to the left but does not rotate the camera/character.
-s drags me to the right and a tiny bit backwards but does not rotate the camera/character.

I’ve tried everything I can think of but I just can’t figure it out, thanks for any insight!

What does your turning code look like? Could be something there fighting with control rotation. Also, if you’ve turned off orient rotation to movement, you may want to try ticking Use Controller Desired Rotation right above it. It should work without ticking the option.. unless something else in code is touching rotation.

I haven’t even gotten as far as writing turning code yet tbh. I tried turning controller desired rotation on and nothing really happened.

Google drive containing recording of movement bug and associated graphs

Attached above is a google drive link (it wouldn’t let me attach it to this because I’m a “new user”) containing the screen recording. Within which the first clip is me holding w, the second clip is me holding a, and third clip is s, and the fourth clip is d. This can be confirmed by looking at the printoff on the left side of the screen.

I then show the graphs which control it.

Thanks!

(post deleted by author)

I solved it!!!

The issue stemmed from collision being on for the gun mesh. So it would “push” the player actor to the left (the gun was on his right)

1 Like