Cursor tracking/or movement based actions

so with an inspiration from a certain horror game
I thought of an idea of where you could do certain actions based on the amount of movement
either by the cursor or the player their self
so obviously one is easier than the other
(cough cough player movement tracking)
but lets say to do something we must shake our gadget fast enough
or move our player faster and faster until they reach a certain speed then decreasing again upon stopping

but what would be the use of this some may ask
with cursor tracking we could create something like a click to move type of game (except you would have to hover or just do when player fires gadget)
but what I’m after is a unique shaking mechanic

so what I’m going to try is experiment with a couple things

  1. I’m going to see if moving the screen with a cursor changes the x and y coordinates ( unlikely but worth a try)
  2. tracking ball coordinates ( if that fails to make something like this I’ma do the third)
  3. attempting pseudo projectiles again and making it so that when you fire a gadget it fires in the same direction colliding with a pseudo hitbox via distance formula ( point and click)

but the vital question
in the third one would be
“how would we track what direction the gadget is pointed in?”
excellent question
there are a variety of ways we could go about this most of which I don’t know

but one way we could do it is like this ig
tracking the last direction the player went in and firing it in that direction

on a side note if one feels like this should be a research topic and not a help topic feel free to change it or suggest it I myself am not too sure if it should be or not :p

You should put this in Devices and research probably

Just tried this one, doesn’t work.

k
also multitasking here with lore and experimenting so I wont be responding for a bit