Download

Setting movement relative to camera

Hey guys,

I have a question regarding player movement. I want to make a Brawl-like or Street Fighter-like fighter clone that basically has its camera set to be stuck on a ninety-degree angle with the player, viewing the world side-on and the player as he moves around the world.

However, just opened the 3rd Person Template and tried doing that with a simple alteration of the CameraBoom component of the template’s MyCharacter Blueprint. I changed ‘Use Pawn Control Rotation’ and all Inherit values to false. The camera no longer turns around the player, but using the mouse, which is an ‘axis input’ if I’m not mistaken, changes what the player character perceives as the direction the camera faces and as such changes the way he responds to input.

In other words, if I ‘rotate’ the virtual camera ninety degrees, pressing forward makes the character move to the left. This is logical considering that’s what he’d normally do, but what I want him to do is move left when I press left IF the camera perceives that direction as left.

In other words, I’d like to implement movement relative to the camera viewing him side-on. Do you have an idea how I could achieve this?

Thanks!
Shrooblord, aspiring game developer just starting to grasp fundamental UE4 mechanics x)