So recently I’ve been trying to implement the camera blueprint shown in this tutorial [[Link][1]] into my own game but I’ve run into some problems.
My problems started with the fact that this camera blueprint made with the 2D sidescroller in mind, whereas I’ve been going with the 3D sidescroller instead. The problem with this is that the axes differ from one another with the player character by default moving left to right on the Y axis in the 3D sidescroller template, as opposed to the 2D sidescroller where the player character instead moves along the X axis when moving left to right. Because of this difference, following the tutorial linked above exactly to the letter would result in the camera completely facing in the wrong direction, I managed to slightly address the issue by changing all the references within the blueprint to the X axis to the Y axis. The end result was that the camera was now aligned with my level layout but facing backwards, an improvement over the situation before, but not by much.
The first picture below shows the misaligned camera, while the second one shows the original view with the default camera:
The issue is that the camera is facing in the wrong direction along the X axis but I can’t seem to get it to face in the opposite direction. Does anyone know how I can reverse the camera so that it faces in the opposite direction?
The other major issue that I’m having is that I can’t attach the camera to my player character because the blueprint setup requires the camera to be assigned to an actor within the scene, and when I start up the game instead of possessing the character I place into the scene, the game spawns another version of my character and that character is the one that gets possessed. The result is that the camera doesn’t follow my player character, instead remaining completely immobile focused on the unpossessed character. I have no idea why this happens and I’m not sure whether or not I did this myself, I recall having some sort of spawning problem upon the starting the game, way back when I first started working on this version of the game, so maybe I did it as some sort of fix?
In theory, this problem could be fixed by preventing the game from automatically spawning a character but I’m not entirely sure that I want to. You see, I’m planning on my game having multiple playable characters and I want the character that the player beat a level with to be the character that the player is then controlling when they enter the next level rather than starting every level with the same character.
Instead I was wondering if its possible to change the scripting of the blueprint so that the camera could, I dunno, possess the character being controlled the Player Controller blueprint I have after they’ve spawned unto the map? Or maybe have the camera follow the Player Controller? I don’t have enough expertise in this area to know what the best way to attach the camera to my player character is.
Any input into this matter would be greatly appreciated!
Constructive Script:
Event Graph:
New Y (formerly X) Value:
New Z Value: