So I need to narrow down just how to do this.
I keep seeing different answers which confuse me.
So I assume this means I need to create 2 vectors, one that goes from the sprite to the mouse position, and another that is the unit vector of the sprite, and then work out the cross product, and then get the angle using the cross product.
Is that correct? Or can I also use the dot product to find the angle? From what I've gathered, the Dot Product only takes two vectors that are in the (X, Y) format and are not unit vectors. This is what confuses me about the dot product, because I can only see how to calculate 1 vector when using dot instead of cross. with cross I simply use a unit vector in addition to the other vector. Whereas with dot you apparently can't use a unit vector to find the angle. So in that case, what other vector do I need to calculate, so I can find the angle between that one and the one going to the mouse position.
To add on, what I'm trying to say is: What vectors do I need to create and what product do I need to use to find the angle between those vectors?
The way I see it, no matter which product, I need a distance vector from the sprite to the mouse position. But the 2nd vector seems to differ between the 2 products. So what should the 2nd vector be?
Also, I wouldn't be surprised if thor had some functions to handle all this easily, but I want to do it manually at first.