- Home /
Input.mouseScrollDelta always zero when phone is connected.
Hi, I'm developing a mobile game for Android where, among other things, you can pan the camera and pinch zoom.
For easier testing I want this functionality to work with touch input and mouse input at the same time when I have UnityRemote connected. The panning works fine on device and editor. For zooming i either want to use the touch input or the mousewheel input.
The problem is that my mousewheel input is not recognized when UnityRemote is connected to the Editor, its always zero. Is this working as intended?
I can reproduce this "bug" with this component attached to some gameobject in an empty project. This will always output zero when connected to UnityRemote and the correct value the moment i disconnect from UnityRemote.
public class Mousewheel : MonoBehaviour
{
private void OnGUI()
{
Debug.Log(Input.mouseScrollDelta.y);
}
}
Answer by deathripper · Sep 24, 2020 at 12:22 PM
In "Edit -> Project Settings -> Editor" you can set the Joystick Source, usually its set to Remote, when switching to local all should work.
Your answer
Follow this Question
Related Questions
Android device as controller for local mulitplayer game,Android device as remote LAN Controller 1 Answer
How do I use the touch functions for Android in the beta? 1 Answer
Input.GetAxis("Vertical") on touch devices. 2 Answers
Input.GetTouch(0).position.x and TouchPhase.Began 1 Answer
Google Cardboard and touch 4 Answers