Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Help me my code won't work and i'm new to codeing

Discussion in 'Unity Remote Config' started by RosadoX23, Jan 23, 2021.

Thread Status:
Not open for further replies.
  1. RosadoX23

    RosadoX23

    Joined:
    Jan 23, 2021
    Posts:
    1
    this stupid error keeps poping plz help it reads " 'Input' does not contain a definition for 'GetKey' "




    using UnityEngine;
    public class PLayermovement : MonoBehaviour{
    public Rigidbody rb;
    public float forwardForce = 2000f;

    // this is FixedUpdate because unity likes it more
    void FixedUpdate()
    { // lol forward force go brrrrrrrrrrr
    rb.AddForce(0, 0, forwardForce * Time.deltaTime);
    if ( Input.Getkey("d") )
    {
    // if a specifect thing does a specifect thing than this code will do a specifect thing
    rb.AddForce(500 * Time.deltaTime, 0, 0);
    }
    }
    }









    that is the code plz help thank you
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
Thread Status:
Not open for further replies.