Disable Keyboard and Mouse Control of Camera


I’m using UE 4.24.1 and created a new C++ empty project.

There, I created a Pawn Class with a USceneComponent as Children who has a UCameraComponent as Children.

Now, when I start the Game in VR Preview, I can control the camera with my HMD.

But I can also control the Game with Keyboard and Mouse. This creates an offset between the HMD real position and the game position.
Also, I can control the Game with K&M when I launch the game.

Is it possible to disable that, so that I can only control it with my HMD, like in the VRTemplate?

You also need to create a Game Mode Base blueprint and set the default pawn to the new pawn blueprint you created. Also configure Maps & Modes in Project Settings with your new Game Mode. Now whatever inputs you define will take precedence.