I’m making a game with magic staff and what i want to do now is to perform spells with mouse movement.
For example if the player press the fire1 button and make a half circle with he’s mouse the that will mean
something in the game.If he press the fire2 button and make a half circle this will mean something else.
My problem is that i don’t know how to detect this mouse movements which can be a circle or a half circle
or move the mouse forward and backward and so on.
“Gesture” is the magic word you’re searching for. It’s difficult to write a decent gesture recognition algorithm, but there are a bunch of assets on the store for this.
Yup, it’s possible… you just have to figure out a way to recognize those motions… (just see some games or apps on phones or tablets, the do the same thing in certain games)
In this case you would probably want to check the mouse cursor coordinates on the screen after you use the left or right mouse button… and check if they change in a way that would make up a circle… or whatever shape or motion you had in mind.