Download

Need Help with Movement based on Camera Rotation

Hello, I’m pretty new to Unreal Engine and I’m trying to make a little prototype, where the player character is able to walk on walls / the ceiling.

For this, I’m using a pawn with a sphere as root component an already made it able, to get up on a wall via a ramp.

But I’m struggling with the movement in direction of the camera.
Here is my current movement blueprint:

I can control the pawn and it moves correctly forward / backwards and to the side. Also looking around is working, but my pawn only moves in the set direction, not where i am looking. On the Camera Component of the pawn “Use Pawn Control Rotation” is enabled, otherwise the camera rolls with the pawn.
I already tried to find some tutorial, but could not find anything that helped. Also tried to add the camera rotation somehow, but it only resulted in movement of the pawn, when I rotate the camera :frowning:

As far as tutorials, try this.
Mostly just to get a leg on using the engine. And cameras.

As far as your specific problem goes…
The main issue is your movement.

You can’t move in radians and expect everything to work.
You are rotating the character - which is really supposed to just stay facing the right way.

Change the input method to use add input / go back to the default template and copy paste.
You can get the ball rolling with an animation BP - or - you can affect just the mesh instead of causing the whole actor to rotate.

That will enable you to uncouple the camera direction from the ball rotation. Allowing you to do more things.

Most notably. It preserves forward vector and all the other conventions that would otherwise cause all sorts of issues any time you try and follow a different tutorial.

Try that and update here if you get more issues.

Oh, thanks for the video, I will look into that :slight_smile:
Meanwhile, I found a solution for my problem by myself:

Primarily I wanted to use movement by radians, so I could move my pawn on the walls / ceiling without problem after applying force to it.
Everything else I tried before resulted in the character sliding on the walls / ceiling, instead of moving like it is one the ground.
Still have to fix the movement camera-orientation based on the surface the pawn uses currently