Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the mouse wheel in LibGDX?

I'm trying to allow the player to zoom the camera in and out using the mouse wheel, but I can't find any methods that interact with the mouse wheel. Is it possible to use the mouse wheel with LibGDX?

like image 537
user2120415 Avatar asked Feb 13 '23 20:02

user2120415


1 Answers

You'll want to create a class that implements the InputProcessor interface (javadoc link here). It contains a method called "scrolled", which I believe is what you are looking for.

like image 108
John Avatar answered Feb 16 '23 08:02

John