Hi, i used my mouse to make my character yaw and pitch… but i wanted to show my cursor on screen, to also be able to select things instead of using a centered widget, so i enable mouse cursor and it Worked great, my character rotates following my mouse… BUT, if i make a click on screen…. it stops working
and then i have to keep any of my mouse buttons pressed to make my character rotation to work, like draging with mouse, i tried to disable click, by set enable click events to false, but it doesn´t work, every time i click on screen, my characters stops following my cursor.
Ok, everything was exactly as you describe and still if i make a click, my character stops responding to mouse movement, i dont have a control camera actor/pawn but i added this to begin play for both pawn event grap and level BP and still dosn´t work if i make a click.
Im not selecting anything, just making a simple click at the screen.
I think it might be a BUG in Unreal 4.20, i replicated the problem on a default flying Project from Unreal, now you can replicate and see what the problem is.
To replicate: create a default flying Project, open flyingpawn BP, connect Event Begin Play to “show mouse cursor”, now to enable mouse, go to “Project settings” create 2 axis mappings, name them “turn” and “lookup”, set turn to “mouse X”, and set look up to “mouse Y”, now return to Flyingpawn BP and make this configuration for “apply forward speed and steering rotation”, it has to be like this:
Now, as you can see, the problem even occours at a default flyingproject from Unreal, i belive this is a bug at Unreal 4.20, since all stepts you mention before are OK at this default Project, even mouse for touch its disable.
While you flight, move cursor, space ship Will follow, make a click and ship Will stop following the mouse movement, i haven´t found a solution jet…
Sorry, forgot to mention that you have to put the set input mode game only node to a a Event Tick node.
I tested it on 4.20 using the first person template and it is working fine.
Do you know how to always keep the flying ship behind the mouse cursor position at the screen?
I want to be able to move my mouse freely, choose a target at any position on my screen, then in 2 or 3 seconds my ship Will smoothly move behind my cursor position, and now both are aligned and centered, do you know how?
If i dont do this, when i move my mouse cursor to the right, the mouse Will keep this right position at the screen, my ship Will be centered because the spring arm and camera are attached to the ship, but my mouse cursor wont be aligned to my ship anymore, creating navigation problems.
If i understand correctly you want the flying ship to follow the mouse cursor on screen. You could try using the get mouse position node to get the cursor location in X and Y, with this info you can move the flying ship (set actor location) to the cursor current location.(Can use the Vinterp to node to smooth out the movement).
There are also some options under the spring arm -> Lag which can smooth out the camera movement , play around the values to adjust to your needs/preferences.