Character movement relative to camera Unreal 5

I’m really enjoying the unreal 5 adventure game course. I have even taken it to a different path where I can swap between cameras based on a box collider (Yay unreal documents). What I haven’t been able to figure out is how to change the player movement based on active camera. What I am trying to implement is a system similar to the later Fatal Frame movement system.

  • Character enters a trigger box and the camera swaps to the new view (Done)
  • Character continues in the direction they were moving as long as the input key is still down (Not done)
  • Once the input is released the character movement changes relative to the new camera direction (Not done)
  • When the character leaves the collider the normal 3rd person camera takes over (Done)

I know this is a bit outside of the courses teaching but I am hoping for help. The additional camera angles could add tension to an adventure game.

Oh and incase anyone wants to understand the camera swapping. You can see how to do it in the below two links
Part 1 - Using a Static Camera in Unreal Engine | Unreal Engine 5.3 Documentation
Part 2 -Switching Between Multiple Fixed Camera Perspectives in Unreal Engine | Unreal Engine 5.3 Documentation

Ok so I have figured out how to change character movement relative to the camera direction.
The final bit I still need help with is to keep original character movement direction until the button is released and then make the change so the movement is relevant to the new camera.

For anyone curious, I modified the player controller to

2 Likes

I personally don’t have a lot of insight to give on this as I haven’t experimented with the mechanics myself. But I suspect making use of the Completed pin to detect when the movement button is released would be a step in a good direction.

As always, you can also try asking fellow members of the community on discord.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms