Change to cameras right and left axis BUT keep players forward if hasn't stopped?

Hello, I am working on a game much like the recent remake of Resident Evil. I’ve been attempting to create fixed cameras with 3d controls. The way it is set up is like this: Player overlaps trigger, then switch to new camera & reorient the players direction to the new camera’s rotation after the player has stopped moving. If NOT then keep the last cameras rotation. What I need to know is how I would tell the blueprint “If the player is still moving and turns left or right THEN adopt current cameras rotation BUT keep the players forward and backwards axis until the player stops”??? Can someone please help me with this? I’ll try my best to share blueprints and give credit where it’s due.

Won’t Left and Right move the player the same direction as Forward and Backward then?

Yeah I think so and it’s got me confused, I’m still new at this. You see if the player is coming back through a camera area and turns left or right without stopping (to go around a corner for example). Then the players left and right are being reversed because the pawn is till using the old cameras rotation and keep the . I was hoping that I could make the player use the current cameras rotation only when the player stops or is turning left or right without stopping ONLY after the overlap has occurred. Perhaps it’s not possible that way. I am at a loss. Like I said I’m still new. I just need to fix this I don’t want someone playing and running from an enemy to have to deal with strange inverted left and right when changing to different cameras.

Sorry for the long response, just wanted to mention everything I could.

I guess i’m having a hard time understanding the problem. Could you upload a test file showing your issue?

Hi bath,

With the setup that you have I would use a separate variable to control rotation for the input axis right. That way the rotation can be set independently from the forward input. I’ve changed your project to reflect these changes. The download will be temporary so after a short period of time the download won’t work.

http://www.mediafire.com/file/15sh5ici5xz346i/Abomination_House_HD.zip

Also, you will notice that when turning left and right his speed is decreased depending on the camera angle. This is because it isn’t going to go against the forward input at a 90 degree angle. To fix this you may have to adjust the strength of the Left and Right movement depending on the camera angle.

Hope that helps,

, I have no idea how to “adjust the strength of the Left and Right movement depending on the camera angle”. This fixed the initial issue but now if my left Analog stick is at a left or right angle of any kind the player will automatically turn as soon as it had overlapped a new camera. I’ve tried everything I can think of :frowning: .

I ran out of time to assist with the issue so I can only offer guidance.

If you don’t want the turn axis to update as soon as you enter a new camera volume use a branch node and a bool to determine when it updates the camera rotation left right.

The bool should be tied to whether or not the player is already holding the left or right direction. You can check this by comparing the axis value if it is nearly equal to 0.

If you want it to then update if the player stops turning then resumes turning. Use the same bool and branch node logic(asking if right Axis is nearly 0) tied to tick. If it is above zero you know the player has begun moving left or right and can set the new rotation. Make sure to use a do once node so that tick isn’t constantly updating rotation.

You can reset the Do Once node after you end overlap AND once the input axis right is equal to 0 (player has stopped moving left or right).