I’m trying to have a crosshair that changes depending on which way you swing your mouse after left clicking. For example, you left click and then drag the mouse to the right, the right part of the crosshair will change to indicate that the mouse is going right.
What I’ve done to achieve this is I made a function that calculates the direction of my mouse based on the axis inputs. It checks if the inputs are greater or less than certain values and then sets a Name variable to Up, Down, Left, Right, etc.
Then I had my HUD draw lines based on the Name variable (switch on Name). So if the variable was set to Right, it would set the translation and color of all lines (via Sequence Node) except the “Right” one to 0 and white, while the “Right” line was translated and colored green to indicate the direction.
Is this the best way to do this? This is just what I figured out after a while of brainstorming it and I want to know if there’s a better way to do this.