Hi!
We have noticed that when the cursor lock mode is set to Locked or Clipped, the Input::MouseMove event fires continuously. Is this intended behaviour ?
Here is some code to illustrate the “problem”:
void MyCamera::OnEnable()
{
Input::MouseMove.Bind<MyCamera, &MyCamera::OnMouseMove>(this);
}
void MyCamera::OnUpdate()
{
if(Engine::HasGameViewportFocus()) {
Screen::SetCursorLock(CursorLockMode::Clipped);
}
}
void MyCamera::OnMouseMove(const Float2& mousePosition)
{
LOG(Info, "Mouse Position: {0}", mousePosition); // continuously fired
}
Side note: I don’t really like the idea of having to constantly call this portion of code into the OnUpdate method. Is it possible to do otherwise?
Thanks!