Search Unity

noob jump

Discussion in 'Scripting' started by CreeperODeath, Sep 19, 2017.

  1. CreeperODeath

    CreeperODeath

    Joined:
    Sep 19, 2017
    Posts:
    4
    Hey, I'm just starting out with unity and I'm trying to make a jump code. Please tell me whats wrong besides literally everything.



    using UnityEngine;

    public class jump : MonoBehaviour
    {

    private void FixedUpdate(Collision collisionInfo)
    {
    if (Input.GetKeyDown(KeyCode.Space))
    {



    if (collisionInfo.collider.tag == "ground")
    {
    Debug.Log("JUMP");


    }

    }
    }
    }
     
  2. CreeperODeath

    CreeperODeath

    Joined:
    Sep 19, 2017
    Posts:
    4
    btw I am just trying to make it output jump into the debug log.
     
  3. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Please do not spam the forums. This is 3 posts you've made that are identical. Please refer to the other responses, in the other 2 threads for some guidance.. :)