30 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "PixoVR | Laser")
31 void ActivateLaserBeam(
bool InActivate);
38 UFUNCTION(BlueprintCallable, Category = "PixoVR | Laser")
39 bool IsOverWidgetUse(
bool InPressed);
46 UFUNCTION(BlueprintCallable, Category = "PixoVR | Laser")
47 void SetHandType(EControllerHand HandType,
bool InIsLocal);
53 UFUNCTION(BlueprintPure, Category = "PixoVR | Laser")
54 bool IsActivated() const;
60 UFUNCTION(BlueprintNativeEvent, Category = "PixoVR | Laser")
61 void OnHoverBegin(const FHitResult& HitResult);
67 UFUNCTION(BlueprintNativeEvent, Category = "PixoVR | Laser")
68 void OnHoverEnd(const FHitResult& HitResult);
74 UFUNCTION(BlueprintNativeEvent, Category = "PixoVR | Laser")
75 void OnSelected(const FHitResult& HitResult);
81 UFUNCTION(BlueprintNativeEvent, Category = "PixoVR | Laser")
82 void OnUnSelected(const FHitResult& HitResult);
88 UFUNCTION(BlueprintCallable, Category = "PixoVR | Laser")
89 void TriggerSelect(
bool State);
91 UFUNCTION(Server, Reliable, WithValidation)
92 void ServerTriggerSelect(
bool State,
AActor* InteractableObject, const FHitResult& HitResult, APlayerController* Executor);
100 UFUNCTION(BlueprintCallable, Category = "PixoVR | Laser")
101 void TriggerHover(
bool State,
AActor* InteractableObject, const FHitResult& HitResult);
103 UFUNCTION(Server, Reliable, WithValidation)
104 void ServerTriggerHover(
bool State,
AActor* InteractableObject, const FHitResult& HitResult, APlayerController* Executor);
106 UFUNCTION(NetMulticast, Reliable, WithValidation)
107 void MulticastTriggerHover(
bool State,
AActor* InteractableObject, const FHitResult& HitResult, APlayerController* Executor);
110 virtual
void Tick(
float DeltaTime) override;
111 virtual
void OnConstruction(const FTransform& Transform) override;
112 UFUNCTION(Client, Unreliable)
113 void ClientTickLaserBeam(
float DeltaTime);
116 void OnRep_LaserBeamActive();
117 void UpdateStateLaserBeam();
120 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
123 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
124 UStaticMeshComponent* LaserBeam;
126 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
127 UStaticMeshComponent* LaserBeamEndPoint;
129 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
130 UStaticMeshComponent* LaserPointerMesh;
132 UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
133 UWidgetInteractionComponent* WidgetInteraction;
135 UPROPERTY(BlueprintReadOnly, Transient, ReplicatedUsing=OnRep_LaserBeamActive, Category = "PixoVR | Laser")
136 bool bIsLaserBeamActive;
138 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
139 float LaserBeamMaxDistance;
141 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
142 float LaserBeamRadius;
144 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
145 float LaserBeamEndpointRadius;
147 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
148 FLinearColor LaserBeamColor;
150 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
151 FLinearColor LaserBeamEndpointColor;
153 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
154 bool bActivateHovering;
156 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PixoVR | Laser")
157 bool bLinkToInteraction;
159 UPROPERTY(BlueprintAssignable, Category = "PixoVR | Laser")
160 FLaserBeamActivated OnLaserBeamActivated;
162 FHitResult HoverHitResult;
163 TWeakObjectPtr<class
AActor> HitActor;
165 UMaterialInstanceDynamic* LaserBeamMaterialDynamic;
166 UMaterialInstanceDynamic* LaserBeamEndpointMaterialDynamic;
172 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;