Context:
-
Rust/wasm32 running on Chrome
-
We are using winit
-
We are building fps game and successfully grab cursor via Window in winit::window - Rust
-
We try to print out the mouse movement via:
WindowEvent::CursorMoved { position, .. } => {
self.camera.borrow_mut().cursor_moved(position.x, position.y);
}
understandably, position (type PhysicalPosition) does not change after cursor grab
What should I be monitoring ? there is MouseInput (fur button clicks) and MouseWheel (for wheel), but no MouseMoved event.
Thanks!