Brand new, be gentle

First off if this should be in another thread I’m sorry, I did check.

Going through this tutorial.

http://anwell.me/articles/unity3d-flappy-bird/

I’d like to learn a lot more. Like an intro screen. Keeping score. Cancelling keyboard input on collision. Etc. Thanks!

… sooooo… what is your question?

check the learn section at the top of the page.

First question is currently it checks if the spacebar is pressed and if so exerts upward force. How do I make it, or what do I look at in the documentation, to prevent keyboard access after a collision is registered.

IE: I’m not a programmer or anything, but I’m having fun messing around in Unity. I’m interested in just 2D stuff. Thanks!

Many ways to do this, here’s a simple one…

Add a public boolean to your player, like

public bool canJump = true;

Then, in your onCollisionEnter2D() function set that boolean to false:

canJump = false;

Lastly, in your Update function, wrap the key input with the following:

if (canJump) {
  if (Input.GetKeyUp("space")) {
    rigidbody2D.velocity = Vector2.zero;
    rigidbody2D.AddForce(jumpForce);
  }
}

Good luck, have fun.