How to set capsule rotation to camera rotation

Parent the camera to the capsule or mesh so its follows it

or GetLocalRotation node with Camera input to it (pure function i belelive) with SetLocalRotation connected to EventTick() with the GetLocalRotation / GetRotation / GetWorldRotation nodes output plugged into it.

Another way is use GetControlledView or getcontrolview or getpawncontrolledview or whatever its called search for Get control and get pawn and it should show up, theres that that act similarily one will have the tooltol “the view of the camera/pawn”.

Or, you could use vectors but thats more complicated. (such as making sure both components are always set to a dummy components GetForwardVector

Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

Also you double posted so I suggest deleting the other post if you can to keep answerhub clean :slight_smile:
Edit: that would be triple posted

Hey guys,

I’m brand new to UE4, just started up yesterday. I’ve created a character mesh and attached it to the capsule, and have all of my movement inputs in place. The character can move just fine, however when I adjust the camera angle, the capsule direction stays static and my movement keys are stuck W = north, S = south, etc… How can I change this to make my W key move my character in the direction of my camera, regardless of the capsules original orientation?

The only changes I’ve made to a blank project are to import a skeletal mesh, add movement inputs, add a game instance, a character, and an event graph.

I know this is ridiculously easy, because I can’t find anyone else asking this question. What am I doing wrong!!

-TheInternet

Hi Nsomnia,

Thanks for the post and I’m sorry for the triple posts, I kept getting an error kicked out at me.

At any rate, I think there’s a misunderstanding here, whether it’s on my part or yours is still to be determined. I’m not wondering about the camera rotation, that’s being driven by the mouse x and y and is attached to a spring arm to the mesh. However, I’m having issues where my character, on his little platform is only moving in a single direction despite the camera orientation. For instance, if I only pressed W in any game out there, and I rotated the camera, I’d be able to continue moving along my forward path. However, in this instance, if I only press W I’ll only move along the same route, regardless of my camera’s orientation.
So for example, if I spun the camera wildly around I would no longer know which way was forward or backward, and by pressing W (forward), I could be moving to the left or right, or even backwards.

-TheInternet

Is your component setup like this so that the camera is parented to the springarm, which is parented to the mesh which is parented to the capsule?

If not, that is most lilely the cause of your problem.
[http://i.imgur.com/Xv7IY9A.png][1]

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

I don’t think that worked either. I know this has to be some super easy fix, otherwise everyone would be having issues with it. This is my exact layout for movement and it shows my hierarchy as well.

Nevermind… I am such an idiot. I was looking at the tutorials for an earlier version of UE4 and the make/break rotate is what screwed me. Sorry for the post.

-TheInternet

:smiley: it gets all all every day

How did you end up solving it? (Always better with threads with solutions.)