Inputs and debug camera

Hi all,

by typing into engine console “ToggleDebugCamera” we can enable debug camera. How to add any inputs to it?
For example, when debug camera is active I want to print string “Hello” from my blueprint every time when x is pressed. How to do it?

thanks in advance

You can use the ExecuteConsoleCommand node and connect that with your desired input and print string.

-Alfie

Hey Alfie,

this is some workaround, thanks. However it would still be nice to have possibility to bind input to debug camera.

cheers :wink:

Hmm i think i have slightly better solution. If You want to have custom input when debug camera is active, You can define it in LevelBlueprint. But be aware that some input will not be read (such as LMB click for example) because debug camera consumes it and it never reaches LevelBlueprint.

cheers

I’ve just discovered that the PlayerController has a CheatManager:

It contains the class used for the debug camera. By assigning the PlayerController a custom CheatManager child class, and assigning it a custom DebugCameraController child class, I can bind inputs in my custom debug camera Event Graph.

So in your current situation, if you override the CheatManager and its Debug Camera class, you can add an Input X node inside this new camera’s Event Graph.