Z
Z
Zimaell2021-03-16 21:02:55
Unity
Zimaell, 2021-03-16 21:02:55

How to understand if the mouse button / finger is stuck?

The instructions say that if you press the button

if (Input.GetMouseButtonDown(0))
            Debug.Log("Pressed primary button.");

that will be action.
And how to track that it is not just pressed, but clamped, that is, I pressed and pull somewhere, the same applies to the finger, that I did not click it, but pressed and pulled somewhere, how to track this action?
How to understand when I let go, and when I pressed again ....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2021-03-16
@Zimaell

Read a little further "instruction" - there are other methods, for example suddenly GetMouseButtonUp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question