- Home /
Mac Magic mouse scroll in ever direction?
Hey, I'd like to know if it is possible to make a game using the macs magic mouse's scroll feature. Is it possible to record every angle of scroll? if so how? and would I be able to use that in a game where the projectiles speed and direction are set by the flick?
P.S. Preferably Java not C#.
Answer by jonas-echterhoff · Jul 06, 2010 at 08:53 AM
While the Input class will only return one axis for the scroll wheel, GUI events will support both - check the delta property of ScrollWheel events. However, when you target the web plugin, this will only work in the CoreAnimation implementation (Safari and Chrome on 10.6), as the old plugin API does not give us this information.
Thanks, and I spoz anyone with a magic mouse would have one of those...
Answer by fherbst · Jul 06, 2010 at 08:47 AM
With UnityPro it is definitely possible - you would have to write an external library for accessing the special magic mouse parameters, as long as Unity does not support it natively.
Answer by CJCurrie · Jul 06, 2010 at 06:43 AM
From what the Unity API describes and what we can see from the default Input config, Scroll Wheel is a Mouse Movement type input registered as an axis. You use GetAxis() to poll it and get a number between -1 and 1. It looks like this means Unity only supports scrolling in one direction.
Your answer
Follow this Question
Related Questions
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
instantiate at mouse problems 0 Answers
Click to destroy object 2 Answers
Having both mouse orbit and smooth follow work at the same time? 0 Answers