Pawn rotate and move forward issue

Hey guys !

I’m trying to move a Pawn by using the keyboard and changing it’s direction by the mouse however I have an issue. Sometimes when I rotate the Pawn, I can’t move forward, sometimes I can. I also noticed that the forward axis can be reversed, instead of going forward it goes backward.

Here are my Pawn Blueprint and my Player Controller Blueprint:

Thanks in advance !

The problem here is just simple math.

You’re moving in only one direction and turning.

You have to move in the direction the pawn faces. And your blueprint has nothing for that.
Please look at the Third Person and First Person Blueprint templates.

After looking to those templates I found what I needed however, now after rotating and moving, I cannot rotate it anymore.

http://i.imgur.com/byzSVzE.png

http://i.imgur.com/aFu2szd.png

Set Use Pawn Controll Rotation to True for the camera.

The problem is that you’re rotating the actor and not the camera. I am not sure which one you want.

If I do that, my camera is no more on the top of my Static Mesh and the problem is still there.

Well then can you show me whats your input setup? Project Settings - Input?

Sure.

I don’t see your mouse input in the input setup.

Also your Events are Custom events. Are you sure that they are called? With the correct values?

Again what are you trying to rotate? The mesh or the camera?

I’m trying to make something similar to this tutorial: - YouTube However he’s using a Character instead of a Pawn but as I read in the documentation, a single pyramid as a player is just a Pawn and not a biped, a Character.

I’m trying to rotate the Mesh and not the Camera.

You should use a character and it’s CharacterMovementComponent. Since that is easier.

Here is the result I get by using Pawn and not Character.

Your characters can still look up and down with mouse, and when facing down/up you move slower coz you move forward to where you are aiming, try getcontrolrotation>breakrotator(only use Z(YAW) out)>makerotator(connect yaw to previous yaw) :slight_smile: