Unreal SDK  v1.2.0
Loading...
Searching...
No Matches
WeArtDeviceTrackingObject.h
Go to the documentation of this file.
1#pragma once
2#include "CoreMinimal.h"
3#include "Components/ActorComponent.h"
4#include "WeArtCommon.h"
5
7
12UENUM()
14{
17};
18
23UENUM()
25{
32};
33
38UCLASS(ClassGroup = (Custom), Blueprintable, meta = (BlueprintSpawnableComponent))
39class WEARTPLUGIN_API UWeArtDeviceTrackingObject : public USceneComponent
40{
41 GENERATED_BODY()
42
43public:
44 // Sets default values for this component's properties
47
48 virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
49
54 UFUNCTION(BlueprintCallable)
55 FTransform GetTrackingSource();
56protected:
57
58 // State variables
59 UPROPERTY(EditAnywhere, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Update method"))
60 TEnumAsByte<TrackingUpdateMethod> updateMethod;
61 UPROPERTY(BlueprintReadWrite, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Tracking source"))
62 FTransform trackingSource;
63
64 // Enable external tracker
65 UPROPERTY(EditAnywhere, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Disable Tracking"))
66 bool disableTracking;
67
68 // Offset
69 UPROPERTY(EditAnywhere)
70 bool useOffsetPreset;
71 UPROPERTY(EditAnywhere, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Offset preset", EditCondition="useOffsetPreset"))
72 TEnumAsByte<OffsetPreset> offsetPreset;
73 UPROPERTY(EditAnywhere, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Position offset", EditCondition = "!useOffsetPreset"))
74 FVector positionOffset;
75 UPROPERTY(EditAnywhere, Category = WeArtDeviceTrackingObject, Meta = (DisplayName = "Rotation offset", EditCondition = "!useOffsetPreset"))
76 FVector rotationOffset;
77};
#define WEARTPLUGIN_API
Definition: Definitions.WEARTPlugin.h:292
TrackingUpdateMethod
Enumerates the tracking update methods.
Definition: WeArtDeviceTrackingObject.h:14
@ PostPhysicsUpdate
Definition: WeArtDeviceTrackingObject.h:16
@ PrePhysicsUpdate
Definition: WeArtDeviceTrackingObject.h:15
OffsetPreset
Enumerates the offset presets for different VR devices.
Definition: WeArtDeviceTrackingObject.h:25
@ HtcVive_Left
Definition: WeArtDeviceTrackingObject.h:26
@ MetaQuest_Right_SteamVR
Definition: WeArtDeviceTrackingObject.h:29
@ MetaQuest_Right_OpenXR
Definition: WeArtDeviceTrackingObject.h:31
@ MetaQuest_Left_SteamVR
Definition: WeArtDeviceTrackingObject.h:28
@ HtcVive_Right
Definition: WeArtDeviceTrackingObject.h:27
@ MetaQuest_Left_OpenXR
Definition: WeArtDeviceTrackingObject.h:30
Component for tracking device objects in the scene.