Show Mouse Curser, view port issues, ignored input.

Hi all,

I’ve been familiarizing myself with UE and it’s workings, and I’m running in to some issues which I’m having trouble wrapping my head around. I’ll start with what I’ve been doing for clarity and insight into the issue then have the issue at the bottom.

I wanted to build several different input interfaces and methods in an attempt to familiarize myself with the input components, scripting components, and blueprint components, and all that they attach to. While doing so, I decided to attempt to make an RTS style mouse control. This would include panning when the mouse would near the edge of the screen, using the mouse wheel to zoom in and out, creating selection boxes, issuing commands to pawns etc.

Initially I started off with creating a C++ PC class, and building a PC BP from it. Then I set up the mouse cursor in the PC by enabling show cursor, enable click events, and enable mouse over events. I created a C++ Pawn blueprint, in which I created the standard scene, spring arm, and camera, while adding a reference to the PC and using the mouse coordinates in the view port to make transformations to the viewport location. All this works fine.

The next step was to integrate zoom functionality, and this is where I ran into issues. I have created Axis mappings for zoom in the editor under project settings, which include WS(KB keys) and MW up/down. I referenced these inputs in my C++ class and created a function to run based off the Axis values (namely creating a zoom speed, multiplying the zoom speed by the axis value, checking it against a min zoom and max zoom conditional calculation, and then finally a transform in the spring arm target length.

Here are the issues.

1)When Play testing, if I click into the viewport (Which has a tooltip, click for mouse control), the cursor dissapears.
2)Unless I click into the viewport, the input’s for zoom do not register.
3)When clicking into the viewport to register the inputs, only WS(KB keys) register, and the mouse wheel does nothing.

How can I make the cursor uniform without having to click into the viewport? Why aren’t the mouse wheel inputs registering? and Why do I need to click in to the viewport to enable input functionality, while not needing to do so using the PC Controller reference with GetMousePosition() for screen panning?

Ok so it looks like trying to map mousewheel up and mousewheel down individually was my problem in terms of the input not working. I added mousewheel axis to the events processed in the PC, changed the Zoom controls in the Input in settings to Mousewheel Axis, and the input registers now, in both modes where the curser is shown, and when I “Click for mouse Control”. Additionally, Even when adding the W and S keys through the Click Key events array, I still need to “Click for mouse control” for W and S to be registered.

I’m still having an issue with this click for mouse control thing. Every time I click in, the cursor dissapears (yet the panning still works as though I have an invisible cursor), and only if I click in will I be able to use other input commands.

Therefor, I would like to know, how I can get my cursor to show properly when I “Click to enable mouse input”, and even make that the default go to. I’ve looked through the options, and enabling/disabling show mouse cursor, setting different cursors, etc, doesn’t seem to be making a difference.