Input::mouseDelta jumps when mouse moves for the first time #1439
Labels
A-Engine
B-Input
C-Bug
D-Good-First-Issue
Easy but interesting
P-Urgent
This issue is a big priority, and it would be good to close it ASAP
Milestone
Problem
The mouseDelta input method returns the movement of the mouse in the last frame. The first time the mouse moves though, it gives a huge delta, which makes FPS cameras and stuff like that buggy - the game dev must add a bool checking whether it is the first movement or not, and ignore it if it is.
Solution
We should keep a flag on whether the mouse has moved before. If it hasn't, then the first mouse delta is discarded automatically and the method should return (0, 0).
The text was updated successfully, but these errors were encountered: