5#include "Math/NumericLimits.h"
9 static ConstructorHelpers::FObjectFinder<UCurveFloat> FadeOpacityCurveAsset(TEXT(
"CurveFloat'/PixoCore/Blueprints/FadeOpacityCurve.FadeOpacityCurve'"));
19 FOnTimelineFloat TimelineProgress;
20 TimelineProgress.BindUFunction(
this, FName(
"FadeOpacityTimelineProgress"));
27 GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red,
"APixoVRPlayerController::BeginPlay Setup ChangingFadeOpacityCurve");
33 Super::Tick(DeltaTime);
38void APixoVRPlayerController::ClientFadeIn_Implementation(
float FadeDuration)
45 if (FadeDuration > MIN_flt)
56void APixoVRPlayerController::ClientFadeOut_Implementation(
float FadeDuration)
63 if (FadeDuration > MIN_flt)
76 EControllerHand Hand = EControllerHand::Left;
78 Hand = EControllerHand::Right;
80 SetHapticsByValue(1.0, Strength, Hand);
84 auto DisableHaptic = [
this, Hand](){ SetHapticsByValue(0,0,Hand);};
85 FTimerHandle TimerHandle;
86 FTimerDelegate TimerDelegate;
87 TimerDelegate.BindLambda(DisableHaptic);
88 GetWorldTimerManager().SetTimer(TimerHandle, TimerDelegate, Duration,
false);
96 PixoCharacter->
FadeSphere->SetScalarParameterValueOnMaterials(
"FadeOpacity", Value);
103 PixoCharacter->
FadeSphere->SetScalarParameterValueOnMaterials(
"FadeOpacity", 1.0f);
110 PixoCharacter->
FadeSphere->SetScalarParameterValueOnMaterials(
"FadeOpacity", 0.0f);
Pixo VR Character This class represents the main character in the Pixo VR game. It extends the AVRCha...
UStaticMeshComponent * FadeSphere
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fade")
virtual void Tick(float DeltaTime) override
void FadeOut(float FadeDuration=1.0f)
UFUNCTION(BlueprintCallable, Category = "Fade")
APixoVRPlayerController()
void FadeOpacityTimelineProgress(float Value)
UFUNCTION()
void FadeIn(float FadeDuration=1.0f)
UFUNCTION(BlueprintCallable, Category = "Fade")
UCurveFloat * ChangingFadeOpacityCurve
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Fade")
virtual void BeginPlay() override
void PlayHapticFeedback(bool RightHand, float Duration, float Strength)
UFUNCTION(BlueprintCallable, Category = "Haptic")