How to use vive motioncontrollers in c++

I have been trying to get the motioncontroller location and rotation into c++.
After searching for hours, I still haven’t gotten it to work; the information in the documentation seems inadequate.

The HMD works without including anything via UHeadMountedDisplayFunctionLibrary::GetOrientationAndPosition(DeviceRotation, DevicePosition);

The motioncontrollers I have tried several ways including via the USteamVRFunctionLibrary but without success. Blueprints work as expected though.

I’m on 4.12.4