i took a reference to the skysphere in my c++ but i cant figure out how to get access to the update function to refresh material. My sun rotates in this but the skysphere stays the same until i figure this out.
#pragma once
#include "Runtime/Engine/Classes/Components/DirectionalLightComponent.h"
#include "Runtime/Engine/Classes/Components/SceneComponent.h"
#include "GameFramework/Actor.h"
#include "DayNightController.generated.h"
UCLASS()
class ODDARON_API ADayNightController : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ADayNightController();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float DaySpeed = 1;
float SunAngle = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
AActor* SunSource;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
AActor* SkyBoxRef;
};