Hello, I’ve got a Klonoa style sidescroller I’m trying to make. Right now the camera follows the player as he turns around, but if the player goes the other direction, the camera spins to the opposite side. I want the camera to rotate with the player, but not spin around when they decide to go the other way I want it to always face the general location of the background. Here’s a gif of the problem I am experiencing. Hopefully I explained well enough what I am looking for.
I’m still fairly new to blueprints.
Update: Here’s my camera code, it’s designed to have a sway so the camera feels softer.
Would it be possible to rotate the skeletal mesh component of your character pawn instead of the whole actor when you turn around? Then you wouldn’t have this problem to begin with, because the transform of the actor would always be aligned to the track (and rotating with it), but always point forwards on the track independent of your mesh direction.
Other option would be to have a variable that saves your current direction (either right or left), and another boolean that saves whether your camera can turn at a given moment or not.
When you detect an input that indicates a change in direction, you can temporarily set that variable to false (it would be connected to a branch before setting the view target). After you detect that your character has finished rotation, you set it to true, but instead of using the original position of your camera, you get one corresponding to the other side. You would be switching between these two every time you finish a direction switch, disabling the camera turn while the switch is happening.