public override void _UnhandledKeyInput(InputEventKey @event)
{
InputEventKey inputEventkey = @event;
if ( inputEventkey.IsActionPressed("reload") )
{
GD.Print("Reload");
reload = true;
}
if ( inputEventkey.IsActionPressed("mode") )
{
CycleMode();
}
}
It's printing reload twice
any ideas?
EDIT: I found the problem. Turns out because my current scene is a child of a Viewport node and i tried to put this code in the viewport to enable object picking and this what causes it. But now i can't use object picking.
public override void _Input(InputEvent @event)
{
UnhandledInput(@event);
}