Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

I'm at 4:42 in this tutorial and I need some help.

Discussion in 'Editor & General Support' started by Brian-Washechek, Jul 14, 2019.

  1. Brian-Washechek

    Brian-Washechek

    Joined:
    Aug 5, 2015
    Posts:
    846


    At around 4:42 he accesses something I am unable to. upload_2019-7-13_19-46-46.png
    I'm stuck with the grey and he has the black. upload_2019-7-13_20-9-48.png .
    I've tried several times to get mine to look like his with the added Forward Force and I just can't. That's why I'm here. Can you help me?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,582
    Why you don't post you script?
    We are not mind readers you know?

    You probably missing line 7-8 or something. Or made private.
     
  3. Brian-Washechek

    Brian-Washechek

    Joined:
    Aug 5, 2015
    Posts:
    846
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class PlayerMovement : MonoBehaviour
    4. {
    5.     public Rigidbody rb;
    6.  
    7.     public float forwardForce = 2000f;
    8.  
    9.     void Update()
    10.     {
    11.         rb.AddForce(0,0,forwardForce *Time.deltaTime);
    12.     }
    13. }
    Sorry about that..
     
  4. Lagermeister

    Lagermeister

    Joined:
    May 13, 2017
    Posts:
    18
  5. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,923
    See his screenshot. He has the Player's RigidBody in the variable set in the editor. No need for that if the screenshot is right.


    What I said above is true? You have the rb set in the editor, right?
    Do you have any errors in the console? (any kind, red or white or whatever)