Last active
April 22, 2019 14:04
-
-
Save Adamcbrz/ccae907086b8beca8931edc2c6816611 to your computer and use it in GitHub Desktop.
Tutorial Tracker: Constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ATracker::ATracker() | |
{ | |
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | |
PrimaryActorTick.bCanEverTick = true; | |
// Initialize VR | |
vr::EVRInitError peError; | |
vrSystem = vr::VR_Init(&peError, vr::EVRApplicationType::VRApplication_Other); | |
// Setup trackerID to -1 so we can test when it is set | |
trackerID = -1; | |
// Create Components | |
sceneComponent = CreateAbstractDefaultSubobject<USceneComponent>(TEXT("Scene")); | |
RootComponent = sceneComponent; | |
cameraComponent = CreateAbstractDefaultSubobject<UCameraComponent>(TEXT("Camera")); | |
cameraComponent->AttachTo(sceneComponent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment