Download

Pawn movement based on Camera position

I did this in UDK, but can’t quite work out the approach in a BluePrint world
the controls would end up being quite similar to Uncharted. The camera can rotate around freely (done), and the character moves Up, Down, Left, Right with the WASD
But at the moment the movement direction is based on his original rotation, but I’d like it that when I rotate the camera around and then press W he runs “forward” in respect to the cameras facing direction

I hope I’ve explained myself well, any pointers or other posts about this would be greatly appreciated!

Cheers

I’m having the same problem!

I can only offer sympathy and hope that someone comes around with an answer. I’ll be trying to find a solution in the meantime.

here is my code from UDK : https://forums.epicgames.com/threads/842021-Uncharted-type-of-camera-player-movement
but, for some reason, i still struggle mapping code to blueprints. it hurts my brain…
once i have it working il post on here - but i assume someone already has this down somewhere

This is how I do it.

MoveWhereCameraIsFacin.png

hmm this doesnt work for me, it seems Control Rotation returns the same values
is that in your character or controller ?

Character, do you have “Orient Rotation to Movement” enabled?

ye its in enabled in my ‘character movement’ component of my character
im using the template project for a top down view, not sure if that helps …
But id assume my “control rotation” is being told not to update in some way…
im clutching at straws at the moment…

Have you unchecked the “Block Input” parameter in the controller blueprint?

i have now… no difference though :frowning:

i have a horrible feeling this will be a simple bug/mistake ive made…

Just tried this setup and it works.

camerathingy.png

POW!
that worked =D
although, what is strange is, moving Left/Right he hits full speed (600) but running forward/backward he only gets to 300

You come across that at all…?

Yeah I noticed that too using the camera vectors, well you can just multiply the forward by 2.

weird, why does this happen ? i assumed something like : it thinks im Strafing ? its odd, it caps at exactly half max speed :S
i will *2 for now, but will try and work out why this is happening

YES! Finally found the answer that helped! Thank you sooo much!

Thank you SOOO much <3