My FPS camera will only position at this one location on the map despite my C++ code and my derived blueprint class setting it to be positioned elsewhere relative to the character. In the picture here I dragged 3 characters onto the map. As you can see the cameras are positioned in the same exact place in the middle of the map even though the characters were placed in different locations. This happens as well when the map gamemode spawns the default pawn (FPSCharacter) at PlayerStarts. I notice that in the blueprint editor the camera position looks correct but the in the details panel it onlys shows the scale in the transform category, not the position or rotation.
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera")
class UCameraComponent* Camera;
// Create and setup first person camera.
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->RelativeLocation = FVector(0.0f, 0.0f, BaseEyeHeight);
Camera->bUsePawnControlRotation = true;
The character movement does not work either, seemly because of this bug. While trying to debug the problem I removed the camera altogether. The crazy thing is that after doing this the camera and movement behaviour works correctly despite the editor says no camera is present.
In the glitched state I can move the character manually and camera does follow. I’ve gone into previous versions of the project where this is not happening. I make changes to the old project to try and update the content to the newer version, but as some point it crashes and the issue returns.
I’m not sure what to do. I really appreciate any help. Thank you.