- Home /
Question by
tompiarulli · May 11, 2012 at 01:06 AM ·
mouse positioncombat
Mouse Movement Combat System
I'm trying to build a combat system similar to those found in Mount and Blade and the Jedi Knight series. The player holds down the mouse button for a brief moment and releases it while swiping in a certain direction to determine the direction of their swing. What is the best way to go about tracking this mouse movement?
Basically when the player first hits the button it should get the mouse position at that point, and potentially it should update every few seconds in case the player is holding down the mouse for a long time. Then as the player moves the mouse and releases the button it should identify the direction the mouse is moving in, and play the applicable animation.
Any guidance is much appreciated.
Comment