Unity 3D simple jump with UI

Viewed 20

when I click my UI Button it runs a jump script. But only when I release the Button... I want that it directly jumps :P puictue Or is this uncommon?

My Button is connected with onClick() with this function:

public void testJump(){
           // rb.AddForce(0,0, moveSpeed, ForceMode.Impulse);
            rb.AddForce(0,moveSpeed, 0,ForceMode.Impulse);

I mean if I press the button nothing happens enter image description here Only when I release it my caracter jumps ... enter image description here

0 Answers
Related