Hi, I am making a mini map for a project using USceneCaptureComponent2D and a render target. I have it attached to my player. The map doesn’t update in real time. It only captures what it sees before the game starts. Also when I package the game the mini map is black
Character.cpp
MapArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("Map Arm")); // Creates a spring arm component to be setup
MapArm->SetupAttachment(RootComponent); // Sets the attachment
MapArm->SetRelativeRotation(FRotator(-90.0f, 0.0f, 0.0f)); // Sets the rotation of the spring arm
MapCamera = CreateDefaultSubobject<USceneCaptureComponent2D>(TEXT("Map Camera")); // Creates a capture component
MapCamera->SetupAttachment(MapArm); // Sets the attachment
Character.h
private:
UPROPERTY(EditAnywhere)
USpringArmComponent* MapArm; // Used for creating a spring arm component
UPROPERTY(EditAnywhere)
USceneCaptureComponent2D* MapCamera; // Gets the capture component
};
Character Blueprint uscene component details:
Widget:
Thank you