- Home /
Trackpad touch detection
In a macbook, is there any way to distinguish between trackpad hard-click and trackpad touch? Currently, Input.GetMouseButtonDown(0) gets called for everything: mouse click, trackpad click, trackpad touch. I tried the Touch class but it is only meant for mobile/touchscreen.
when u say trackpad touch do u mean when the player touches the trackpad, or when the player moves the mouse with the trackpad, or when the player taps the trackpad?
touch/tap , like how you do a mobile touchscreen, ins$$anonymous$$d it is the trackpad. And not a click, where you can hear the clicking sound.
what you can do is sense where the mouse is (which can be moved from the trackpad), and clicks (left click, right click). These things combined can work similarly enough to what ur asking. On second thought, i'm not sure if tapping the touchpad returns as left click?
Not possible as far as I know - though there are plugins that can help. I have not used this myself but here's one:
https://assetstore.unity.com/packages/tools/input-management/trackpad-touch-40277