I am trying to move my camera around in my top down RTS by right clicking and dragging. I have all the mechanics set up and even though it’s not a big problem the cursor hides when ever you right click. Now I have tried show mouse cursor after the click and switching the input modes without any luck. The reason for my wanting the cursor to be visible is that it’s just a little disorienting not knowing where the cursor is as you begin to drag yourself around.
Ya nope already tried that in input mode game only or game and UI it hides it when you click and hold the mouse button I need to subvert this and that doesnt work.
Nope already default pawn class to give better context I followed this tutorial series to get my top down camera and the controls for movement are in the player controller.
It’s in either of the first 3 videos where he does the forward, backward, left, and right controls the only difference is I have a gate with the right click pressed as the open and released as the closed and mouseX/Y as the entry. Then I took the mouse delta (the distance the cursor has traveled) -1 for drag and not push as the axis and used that to get how far to move the character. Effectively allowing you to click and drag your camera pawn around. It just gets disorienting when the cursor disappears as you do this.
Well I’ll give it a try couldnt hurt. I’ll have to wait till I get home cant right click on teamviewer on my phone. However I have a very strong feeling this is not the problem I can almost 95% guarantee that it has something to do with how the input mode works and how it captures the mouse cursor for movement. But theory is theory till you test it right.
Why is the cursor not showing, what is hiding it? Once you order the Player Controller to Show Cursor, it will not go away unless you explicitly hide it or the mouse enters a widget which overrides the setting.
Well my best guess is the input mode so say you start a first person template normally the input mode is set to game and UI. Then make a custom player controller or get the controller in another blueprint like the first person character and set show mouse cursor to true. If you hit play and click on the screen and hold the click the cursor will temporarily be hidden until you release click. While the cursor is showing you cant look around but when you click the cursor gets captured to allow you to control look rotation. Why the cursor needs to be hidden to do this I dont know but for the game I’m working on it would be helpful if it’s still shown when I click to control in my case a top down camera pawn.
Btw just in case for referance the input modes are game and UI, UI only, and game only it’s pretty strait forward what each do. I have tried them all and game only or game and UI do the same thing while UI only wont allow me to move the top down camera pawn I have set up which is expected because that input mode is for UI only.
this might be because your pawn is from a “Character” class, which has a bunch of built-in code. Unless you know how to program with C++, the easiest way would be to reparent your pawn as a more generic class, like a Default Pawn or Pawn. Double click your character’s blueprint and click “Class Settings” at the top, then you can reparent in the details panel, but doing this is going to break a lot of stuff for you. You’re basically creating a character from scratch
Ok so I was right I figured it was something to do with the input mode I thought this checkbox had something to do with cinematics or something else didn’t even think that it was the thing causing my problem.
Just uncheck hide cursor during capture (this is on by default)