Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How come mouse delta isn't correct?

Asked by 6 years ago

When I stop moving my mouse, I'd expect the delta to read out 0,0 but it reads 0.839999974

Why is this the case and how to I fix it?

0
Please post your script so that we can find out the error(s) in it. FazNook 61 — 6y

1 answer

Log in to vote
0
Answered by
FazNook 61
6 years ago

You should'nt be expecting the Delta to read 0,0 in the first place. It will if you stop moving your mouse(even though its locked) and jump your character. Delta is a Vector3and it is based off of where your mouse is locked.Delta has a value only if MouseBehavior is LockCenter or LockCurrentPosition, otherwise its gonna be 0,0,0. Think of this as a graph with the X,Y,Z quantities, if you are using LockCenter, then its gonna be based off of the center, and if its LockCurrentPosition, its gonna be based off of the position the player's cursor was in at the time of function. This isnt something that shows targetposition as in a humanoid.

I hope you have an understanding on what Delta is and how it works, if you do, make sure to upvote. Thank you.

0
Thank you tobyjing2005 107 — 6y
Ad

Answer this question