T
Triangle
Guest
Alright, I'm in the very very early stages of working on a platformer with mouse aim. It uses the standard kind of system where a separate arm object rotates around the player's shoulder with an image angle that follows the cursor. For a handful of design reasons, I really don't want to use an alternative method like excessive bloom / spread for the bullets instead of conventional recoil - besides, I'm handling that sort of thing with another system as well, so I want to keep recoil separate. I figured the straightforward thing would be to 'push' the cursor upwards a few pixels every shot. So now my question is: how exactly do I do that, and is there a better way?
I know that I can pull the mouse position with some constants, but can I use those to alter the mouse position?
Would I be better off spoofing the cursor with an object that follows the cursor at all times besides when recoil is happening and then writing the arm object's trigonometry code to target that instead of the cursor?
And finally, if altering the mouse position directly is the best way, what can I do to avoid issues where the player loses control of the mouse in menus / windowed mode / e.t.c? I understand it's generally discouraged to directly mess with the cursor, so I might as well do it right.
Thanks for any advice y'all have for planning this out.
I know that I can pull the mouse position with some constants, but can I use those to alter the mouse position?
Would I be better off spoofing the cursor with an object that follows the cursor at all times besides when recoil is happening and then writing the arm object's trigonometry code to target that instead of the cursor?
And finally, if altering the mouse position directly is the best way, what can I do to avoid issues where the player loses control of the mouse in menus / windowed mode / e.t.c? I understand it's generally discouraged to directly mess with the cursor, so I might as well do it right.
Thanks for any advice y'all have for planning this out.