Mordhau’s mouse direction indicator

I’m trying to create something similar to Mordhau’s mouse direction indicator as shown below:

I’ve looked around on previous forums and found something that works, but it’s dysfunctional with shift lock. My project heavily relies on shift lock for movement purposes, so it’s out of the picture to not use it.

The forum I have found compares the previous mouse X, Y position to a new X, Y position, but with shift lock enabled that position remains at 0,0. I’ve been thinking about “faking” a shift lock by not entirely locking the mouse at 0, but by constraining it to a small area giving it the freedom to return information on where it’ll be going. That comes with the problem of rotating the character/camera and such though.

But I’m creating this topic concerned for if there are any seemingly better methods or workarounds that I’m missing? Even if they’re unorthodox.

TL;DR I’m looking for methods on how to return what direction a player’s mouse travels during shift lock.

Referred forum:

You can use mouse delta.

Been searching and I remember I solved someone elses exact same problem with replicating mordhau system as well

2 Likes

Do you still happen to have your source code from the example in that post?

That local script should be all that’s needed in under solution, for the GUI just follow the script.Parent referencing and create the two gui frames for it to control.

I completely missed that you put it in there my bad