Hi,
I followd this guid about setting up the google vr (daydream) and it worked fine:
https://docs.unrealengine.com/en-US/Platforms/GoogleVR/HowTo/CameraSetup
However I would like to base my VR-Pawn on a C++ class instead of using blueprints, and I would also like to move as much functionality as possible from the BP-Implementation to C++.
In the tutorial we are told to invoke the BP-function “Set Tracking Origin” but I would like to do that in C++.
The Class FGoogleVRHMD defined in the file Epic Games\UE_4.20\Engine\Plugins\Runtime\GoogleVR\GoogleVRHMD\Source\GoogleVRHMD\Private\GoogleVRHMD.h has the function
virtual void SetTrackingOrigin(EHMDTrackingOrigin::Type) override;
So I made a new C+±Class that derives from APawn, and I also added the following lines to my build.cs:
PublicDependencyModuleNames.AddRange(new string] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “GoogleVRHMD” });
PrivateDependencyModuleNames.AddRange(new string] { });
PublicIncludePaths.AddRange(new string] { “GoogleVRHMD/Public”, “GoogleVRHMD/Classes” });
Now I can use the following include in myPawn.cpp
#include “GoogleVRHMD/Private/GoogleVRHMD.h”
So far, so good.
But how do I access the aformentioed function?
Best regards,