Download

VR with C++ in 4.20

Hi everyone,

I’m trying to make a VR template but in C++. My question is how to do that now that everything in MotionControllers.h and HeadMoutedDisplay.h is in private ?
I suspect a little mistake from the Epic Team or just a way to force us to use BP Programming.

HeadMountedDisplayFunctionLibrary.h (15 KB)

MotionControllerComponent.h (7.94 KB)

Furthermore in the documentation everything is at minimum protected not private.

We can no longer configure Motion Controllers in C++ so what should I do ? Without modifying the engine and recompiling it (If we can) or program in BP?

Best regards,

Alexandre

You probably figured this out already but in case someone didn’t. The GENERATED_UCLASS_BODY() macro includes a “public:” so everything after those macros is public. Visual studio will not pick up on this by default, but you can use these functions and your game will compile.