Jump to content
Unity Insider Forum

Bumpy Player Animation


Recommended Posts

Hello, 

I created a small Acade Game, where you must collect bananas and avoid the tigers. My problem is that my Player has small bugs, when he jumps. My question is, how can i fix that and how I can program it so that the player only jumps when the button is pressed once and not when it is held down. 

Link to comment
Share on other sites

Hallo,

Am 22.7.2021 um 19:57 schrieb CyberHydra:

player only jumps when the button is pressed once and not when it is held down. 

UI Button ?.

No Ui Button then this.

Input.GetButton()  //  Returns true while the virtual button identified by buttonName is held down.

[ Gibt true zurück, während die durch buttonName identifizierte virtuelle Schaltfläche gedrückt gehalten wird.]

 

Input.GetButtonDown() //  Returns true during the frame the user pressed down the virtual button identified by buttonName.

[ Gibt während des Frames true zurück, in dem der Benutzer die durch buttonName identifizierte virtuelle Schaltfläche gedrückt hat.]

Gruß Jog

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...