So in the past I've always just used mouse.Hit.p with "mouse" being gotten through :GetMouse() and have never had issues before. As of late though I've found myself having some odd issues where if I were to do something like fire a projectile or the like, the projectile would veer off to the left or right by a stud or two. It's especially bad when aiming at anything with a rounded or angled surface. It just seems to have a habit of occasionally registering the mouse a bit off from where it's actually pointing.
After digging around the method I'm using now is the only one I could actually find on things like forums and other issues so are there any other alternate, more precise options, or am I stuck with the slightly wonky detection? I'm also hoping to find a better alternative as there has been discussion of potentially deprecating the old mouse object after some people have been having other issues such as the mouse just altogether not connecting.

7 comments
You can use character's look vector if its a first person game that locks the mouse, but :GetMouse().Hit.p is the only way I know
Hm... I'll have to consider that when I step into first person gaming.
Just something that I haven't said, you can use the look vector for xy axis but you need to use mouse.Hit.p to the Y axis
(For a 2d game you can use just the look vector)
I'll keep those in mind should I decide to work on stuff like that. Actually kinda planned to work on a 2D project.
Maybe its possible using UserInputService... I'll check on the wiki
I didn't see anything on the wiki but if you find something I didn't please share.