9 PrimaryActorTick.bCanEverTick =
true;
10 PrimaryActorTick.bStartWithTickEnabled =
false;
13 SceneRoot = CreateDefaultSubobject<USceneComponent>(TEXT(
"SceneRoot"));
16 ProgressPlane = CreateDefaultSubobject<UStaticMeshComponent>(TEXT(
"ProgressPlane"));
20 SetActorHiddenInGame(
true);
32void APixoVRCircleProgress::SetCircleProgressEnabled_Implementation(
bool bIsEnabled)
34 SetActorHiddenInGame(!bIsEnabled);
35 SetActorTickEnabled(bIsEnabled);
40 Super::Tick(DeltaSeconds);
45 const FVector2D InputRange(ThresholdPercentage, 1.0f);
46 const FVector2D OutputRange(0.0f, 1.0f);
57 if (
const auto Character = Cast<APixoVRCharacter>(GetOwner()))
virtual void Tick(float DeltaSeconds) override
UPixoVRLongHoldComponent * LongHoldComponent
UPROPERTY()
virtual void BeginPlay() override
float VisibilityThresholdTime
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Setup)
UMaterialInstanceDynamic * ProgressMaterialInstance
UPROPERTY()
UStaticMeshComponent * ProgressPlane
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Components)
void UpdateCircle(float Percentage)
Updates the circle progress to the specified percentage.
USceneComponent * SceneRoot
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Components)
float GetNeededTime() const
Gets the needed time for a successful long hold.
float GetCurrentTime() const
Gets the current time of the long hold.
float GetCurrentTimePercentage() const
Gets the current time percentage of the long hold.