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.

Official John Lemon’s Haunted Jaunt: 3d Beginner Official Thread

Discussion in 'Community Learning & Teaching' started by Woolley_Kat, Apr 15, 2019.

  1. Woolley_Kat

    Woolley_Kat

    Unity Technologies

    Joined:
    Jan 18, 2018
    Posts:
    18
    3DBeginner_AssetStore_SocialMedia.png

    Alongside our brand new Learn platform, Unity’s Learn Content team have released a new beginner project. This project is a great way to introduce you to beginner code, physics, 3d environments, cameras and more, all wrapped up in a stealth game mechanic.

    Step by step, create your own haunted hotel game using the beautiful 3D assets provided. The written lessons have editor screenshots and gifs to help you learn how the adorably creepy hotel was created and make your own version for John Lemon to tremble around.

    For the first time we’ve released two versions of our project. You can find the tutorial project where you build the game from scratch, but also the completed project where you can see how we’ve made the demo level and play the game in the editor.


    Find the tutorial on the Unity Learn site here

    Download the Tutorial Project here

    Download the Complete Project here

     
    Last edited: Apr 15, 2019
  2. lightwaterjohn

    lightwaterjohn

    Joined:
    Nov 29, 2017
    Posts:
    13
    Thanks for providing this!

    I found a small error in the tuitorial on this page:

    https://learn.unity.com/tutorial/setting-up-3d-beginner

    Under
    6. Layouts

    It says:

    4 Split
    This layout is good for looking at 3D models from different angles, but not much use for our 2D Project.

    This is a 3D project, so I found this bit confusing - but it's obviously copy-paste error.
     
  3. Deleted User

    Deleted User

    Guest

    Not an error at all. If you read correctly, this part is just a description of all the available layouts in the editor whatever the project or tutorial you are working on.
     
  4. Juande

    Juande

    Joined:
    Nov 20, 2012
    Posts:
    16
    What's the usage license for the tutorial assets? I can't find it anywhere. Thanks!
     
  5. Deleted User

    Deleted User

    Guest

    The licence details are probably inside the project resources you downloaded; generally a text file that displays in the Inspector view on launching the project.
     
  6. Juande

    Juande

    Joined:
    Nov 20, 2012
    Posts:
    16
    Thanks for answering, but I already looked there. :(
    There's no information about the license in the Asset Store project description either.
    I'll suppose they're free to use in any non-comercial project.

    upload_2019-4-26_13-44-22.png
     
  7. chummscrubber

    chummscrubber

    Joined:
    Jul 7, 2013
    Posts:
    6
    For anyone interested this code snippet draws the pathing of the enemies (the waypoints) so that you can see what their patrol path looks like

    Code (CSharp):
    1. private void OnDrawGizmos()
    2.     {
    3.         Gizmos.color = Color.green;
    4.         for (int i = 0; i < waypoints.Length; i++)
    5.         {
    6.             Gizmos.DrawWireSphere(waypoints[i].position, .5f);
    7.  
    8.             if (i + 1 < waypoints.Length)
    9.             {
    10.                 Gizmos.DrawLine(waypoints[i].position, waypoints[i + 1].position);
    11.             }
    12.             else
    13.             {
    14.                 Gizmos.DrawLine(waypoints[i].position, waypoints[0].position);
    15.             }
    16.         }
    17.     }
     
  8. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    90
    Just ran through this tutorial, all great stuff and a LOT of stuff for a beginner. Its a really well written tutorial, one bit of feedback I have is that it would be really helpful if you could include comments in your c# and shader code so that you don't have to always refer back to the tutorial pages to know what everything is there for (especially helpful in those shaders). Thanks for the great work!
     
  9. impaladesign

    impaladesign

    Joined:
    Mar 20, 2019
    Posts:
    2
    I'm new to Unity and am working on John Lemons Haunted Jaunt. I am getting the following error:

    MissingComponentException: There is no 'Animator' attached to the "JohnLemon" game object, but a script is trying to access it.

    I have gone through the script several times and in the Inspector Animator Controller I can see JohnLemon. I have googled this and cannot find a solution. Can you see where I am going wrong?

    Thanks,

    Dan
     
  10. AggelosKout

    AggelosKout

    Joined:
    May 2, 2019
    Posts:
    5
    Hello, I am currently in the Part 2 of the tutorial and I have followed the steps in order to make JohnLemon able to walk and turn, but in the end when i am playing the game the character only turns but he is unable to walk. I went back to my code to check for error but couldnt find any. I also copied pasted the code from the end of the tutorial, just in case i miss something but still no walking for the character. Any help would be welcome.
     
    Last edited: May 2, 2019
    mking1955, courtlandjay and Bugs95 like this.
  11. blackski56

    blackski56

    Joined:
    Nov 11, 2018
    Posts:
    2
    Iv been doing this tut as well it’s good I did run into some of the same problems
    Their is no reference and m_Animation
    I had 4 errors I did not give up I finished the script without errors just read what c# is telling you because I found auto type sometime gives u a way to do it different or correct it I was kinda excited to try it and I did JL falls through my code is correct ridge body physics?
     
  12. AggelosKout

    AggelosKout

    Joined:
    May 2, 2019
    Posts:
    5
    The thing is I get no errors - no warnings on Visual Studio.

    Also I see that
    using System.Collections;
    using System.Collections.Generic;

    are not getting used. Which is weird.
     
  13. Khan_Yasin

    Khan_Yasin

    Joined:
    Jan 31, 2018
    Posts:
    3
    you don't have to worry about it basically its saying that you're not using those in the script and you can remove them if you want to(Don't remove them until you have finished the tutorial)
     
  14. KingToast

    KingToast

    Joined:
    Dec 19, 2017
    Posts:
    2
    I just downloaded the project and i can't get it to run. It says there are issues with dependencies and things not existing .
    upload_2019-5-4_3-9-3.png
     
  15. AggelosKout

    AggelosKout

    Joined:
    May 2, 2019
    Posts:
    5
    I know, but still my code doesn't work for walking and i have no errors - or warnings. Is it possible any of you that made it work, to post here the code for the PlayerMovement?
     
  16. Khan_Yasin

    Khan_Yasin

    Joined:
    Jan 31, 2018
    Posts:
    3
    here is the code, you can move him using wasd or arrow keys
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class PlayerMovement : MonoBehaviour
    6. {
    7.     public float turnSpeed = 20f;
    8.  
    9.     Vector3 m_Movement;
    10.     Quaternion m_Rotation = Quaternion.identity;
    11.     Animator m_Animator;
    12.     Rigidbody m_Rigidbody;
    13.  
    14.     // Start is called before the first frame update
    15.     void Start()
    16.     {
    17.         m_Animator = GetComponent<Animator>();
    18.         m_Rigidbody = GetComponent<Rigidbody>();
    19.     }
    20.  
    21.     // Update is called once per frame
    22.     void FixedUpdate()
    23.     {
    24.         float horizontal = Input.GetAxis("Horizontal");
    25.         float vertical = Input.GetAxis("Vertical");
    26.  
    27.         m_Movement.Set(horizontal, 0f, vertical);
    28.         m_Movement.Normalize();
    29.  
    30.         bool hasHorizontalInput = !Mathf.Approximately(horizontal, 0f);
    31.         bool hasVerticalInput = !Mathf.Approximately(vertical, 0f);
    32.  
    33.         bool isWalking = hasHorizontalInput || hasVerticalInput;
    34.         m_Animator.SetBool("IsWalking", isWalking);
    35.  
    36.         Vector3 desiredForward = Vector3.RotateTowards(transform.forward, m_Movement, turnSpeed * Time.deltaTime, 0f);
    37.         m_Rotation = Quaternion.LookRotation(desiredForward);
    38.     }
    39.  
    40.     private void OnAnimatorMove()
    41.     {
    42.         m_Rigidbody.MovePosition(m_Rigidbody.position + m_Movement * m_Animator.deltaPosition.magnitude);
    43.         m_Rigidbody.MoveRotation(m_Rotation);
    44.     }
    45. }
     
  17. Apridise

    Apridise

    Joined:
    May 4, 2019
    Posts:
    2
    marrocelli and Fubsr like this.
  18. Apridise

    Apridise

    Joined:
    May 4, 2019
    Posts:
    2
    I initially couldn't get him to move as well, but once I checked the exact Case and Spelling in my script to the animator I created in Unity I could see my case was wrong.
     
    AggelosKout likes this.
  19. AggelosKout

    AggelosKout

    Joined:
    May 2, 2019
    Posts:
    5
    nah, still doesnt work!!!!

    I dont get what u did to fix it. can u elaborate?
     
  20. AggelosKout

    AggelosKout

    Joined:
    May 2, 2019
    Posts:
    5
    I found out what was it. In the animator my bool var was isWalking while in the code was IsWalking. fml! I was so frustrated
     
  21. KingToast

    KingToast

    Joined:
    Dec 19, 2017
    Posts:
    2
    ve03vsx likes this.
  22. oiramsch

    oiramsch

    Joined:
    May 5, 2019
    Posts:
    2
    I'm struggling with the chapter "The Environment". I cannot find the "MainScene" you're referring to. I'm using the "3D Beginner Tutorial Resources" package and there're no scenes inside of the project resources (as far as I can see). When I take a look into the "3D Beginner Complete Project" resource packages, I can find the MainScene of cause, but were I really wrong, using the Tutorial resource package instead of the "Complete Project" package?? Thanks Mario
     
  23. Awarisu

    Awarisu

    Joined:
    May 6, 2019
    Posts:
    215
  24. oiramsch

    oiramsch

    Joined:
    May 5, 2019
    Posts:
    2
    Ok, found my fault, I didn't saved sample scene in chapter 2 as main scene, therefore I was confused, because I thought there must be a preconfigured mainScene, instead it starts with the empty scene and dragging the level prefab into the scene is doing the trick.
     
    ajeasmith96 likes this.
  25. r2nielpha

    r2nielpha

    Joined:
    Jul 7, 2014
    Posts:
    2
    I started the tutorial quite exited and I got frustrated as soon as the code was introduced and ended up skiping and just pasting the code without reading most of the explanations. I just couldn´t follow.
    I think the coding part is way out of the scope of an actual beginner.I get it has to be takled but... maybe in a easier way.
     
  26. LadyEmber

    LadyEmber

    Joined:
    May 8, 2019
    Posts:
    1
    I am also having the same problem; my Visual Studio is also telling my there are no problems with my code but when i go into unity it gives me "Assets\Scripts\PlayerMovement.cs(17,35): error CS0246: The type or namespace name 'm_Animator' could not be found (are you missing a using directive or an assembly reference?)" and "Assets\Scripts\PlayerMovement.cs(18,36): error CS0246: The type or namespace name 'm_Rigidbody' could not be found (are you missing a using directive or an assembly reference?)"
     
  27. Jawlimitless07

    Jawlimitless07

    Joined:
    Mar 29, 2019
    Posts:
    1
    Hi, I'm having trouble on Player Character Part 2 - Step 17. When I hit Play, the character doesn't respond to input on other the directional arrows or w, a, s, d. Upon checking the "Animator" tab, I noticed that a light blue progress bar fills from left-to-right repeatedly while the scene is playing. Please see my movement script here to check for errors as well.

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class PlayerMovement : MonoBehaviour
    {
    public float turnSpeed = 20f;

    Animator m_Animator;
    Rigidbody m_Rigidbody;
    Vector3 m_Movement;
    Quaternion m_Rotation = Quaternion.identity;

    // Start is called before the first frame update
    void Start()
    {
    m_Animator = GetComponent<Animator>();
    m_Rigidbody = GetComponent<Rigidbody>();

    }

    // Update is called once per frame
    void FixedUpdate()
    {
    float horizontal = Input.GetAxis("Horizontal");
    float vertical = Input.GetAxis("Vertical");

    m_Movement.Set(horizontal, 0f, vertical);
    m_Movement.Normalize ();

    bool hasHorizontalInput = !Mathf.Approximately(horizontal, 0f);
    bool hasVerticalInput = !Mathf.Approximately(vertical, 0f);
    bool isWalking = hasHorizontalInput || hasVerticalInput;
    m_Animator.SetBool("IsWalking", isWalking);

    Vector3 desiredForward = Vector3.RotateTowards(transform.forward, m_Movement, turnSpeed * Time.deltaTime, 0f);
    m_Rotation = Quaternion.LookRotation (desiredForward);
    }


    void OnAnimatorMove()
    {
    m_Rigidbody.MovePosition(m_Rigidbody.position + m_Movement * m_Animator.deltaPosition.magnitude);
    m_Rigidbody.MoveRotation(m_Rotation);
    }
    }


    Any other suggestions for where I should check things are going wrong?
     
  28. aurumargentum

    aurumargentum

    Joined:
    May 8, 2019
    Posts:
    1
    I've finished the tutorial, and the game runs well in every way except for one: the long hallway with the two rooms and the ghost. I cant get Mr. Lemon to enter these rooms. For gameplay, entering these rooms is pretty vital, otherwise you die by ghost. How do I fix this?
     
  29. k_dunlop

    k_dunlop

    Joined:
    May 10, 2019
    Posts:
    16
    Sounds like you didn't name the Boolean variable IsWalking correctly during the Animator setup. Ensure it has a capital I and isn't spelled incorrectly as 'isWalking'
     
  30. capcarrow

    capcarrow

    Joined:
    May 5, 2019
    Posts:
    1
    Hi! I'm new to unity and have now almost completed the whole tutorial but I have a problem with my ghosts. I have entered the same position values as the tutorial show, however all ghosts (except the ghost in the first room, who is floating above the walls) go through the floor (see picture).

    I'm not sure what the problem is and what I need to change in order to make them walk on the floor. Is it something I have missed or something in the script?


    Ghost problem.jpg
     
    Last edited: May 10, 2019
  31. shelmire

    shelmire

    Joined:
    May 13, 2019
    Posts:
    1
    I encountered an issue when copying the PointOfView object into the Ghost (and making duplicates). Although the PointOfView object had the observer script and showed the Player and Game Ending as the expected objects, the collision did not happen. I had to reassign the same objects to the Player and Game Ending variables (even though they appeared to already be assigned). Is there some reference that may have been incorrectly copied? I believe I followed Dynamic Observers section 5 precisely.
     
  32. Rakesh6720

    Rakesh6720

    Joined:
    Jun 14, 2018
    Posts:
    5
    I couldn't get the ghosts to move along the nav mesh. Did anyone else have this problem by the time they reached the audio portion of the tutorial?
     
  33. Rakesh6720

    Rakesh6720

    Joined:
    Jun 14, 2018
    Posts:
    5
    have you checked to see if the y position value of your floor is beneath the y value for the ghost?
     
  34. r2nielpha

    r2nielpha

    Joined:
    Jul 7, 2014
    Posts:
    2
    Hi,
    I'm nearly at the end of "Player Character: Part 2" and I have to admit that there is not much that I can understand about the code that is being used so far.
    I'm not sure if it is presented just as an introduction of "how, where or when" to put code. Or, in order to continue further in the course, I am supposed to pecisely understand what Im doing... The thing is that I don't get it.
    Is this expected? Can I go on or should I leave it here?
    Thanks
     
  35. darksilence

    darksilence

    Joined:
    Oct 16, 2014
    Posts:
    16
    You are supposed to write the code yourself. And not rushing it, trying to understand each step then you wont run into these kind of bugs or you notice. What i am doing is i am trying to do the part by myself before reading. Then read it bt no look at code after i managed to do something working as intended i check the code to see how could it be writtten more effectively. Almost all the time i see i could write the code better yet almost every time i could do what i wanted to do somehow even if its not the best way.
     
  36. darksilence

    darksilence

    Joined:
    Oct 16, 2014
    Posts:
    16
    Actual beginner in this context is new to unity and game development. It doesnt have to mean no programming experience at all. Any source on anywhere will actually advice you learn some kind of programming before going through game development. As a beginner to unity and and game development,but having C programming background i found courses at exact level i suppose them to be. Unity learn isnt supposed to go through 30 hours of variables, loops course when there is hundreds of them can be found online for free.
     
  37. darksilence

    darksilence

    Joined:
    Oct 16, 2014
    Posts:
    16
    Pick a main stream programming language like python/c++ even javascript does the job. Find an online course. Go through it. Return when you finish, start over, try to understand each thing you do. It will keep you busy for 2 weeks 2 hours a day now. But it will save hundreds of hours later.
     
  38. dangioz

    dangioz

    Unity Technologies

    Joined:
    Apr 23, 2019
    Posts:
    1
    I can't get past the second lesson because apparently, the asset does not import fully. As soon as it asks me to look at "root" I can only see legs but no arms, as the tutorial asks.
     
  39. darksilence

    darksilence

    Joined:
    Oct 16, 2014
    Posts:
    16
    I didntdo 3d one i am doing 2d one but did you try cleaning the project and downloading fresh ?
    Edit : Also double check constraints, rigid body and colliders. İts possible that you made a mistake and upperbody goes through floor due to gravity.
     
    Last edited: May 14, 2019
  40. SimsalamimaHuHu

    SimsalamimaHuHu

    Joined:
    Jan 25, 2019
    Posts:
    1
    Hi everyone. First let me start with a praise, great job with this tutorial, from the detailed (and encouraging :)) description, pace at which new concepts are introduced, script examples etc. This is how an introduction to a new framework / language should be done in general (and it rarely is).

    I would like to report a small issue I had with the WaypointPatrol script from the tutorial; all my ghosts stopped a bit before the first waypoint as the remaining distance was never smaller than the stopping distance. I don't know if I missed some configuration and the problem is on my side but such behavior kinda makes sense to me. With the expression changed to navMeshAgent.remainingDistance <= navMeshAgent.stoppingDistance the enemies behave as expected.
     
    maney216 and pzgg777 like this.
  41. PeppaDaWoundz

    PeppaDaWoundz

    Joined:
    May 16, 2019
    Posts:
    2
    Guys I seem to be having a problem even beginning the tutorial. Im trying to get the assests from the asset store. There are 2 results with the same thumbnail. Clicking the first one gives me a "Unfortunately, undefined is no longer available." and the second one gives me a 404 error then it says Im offline. This is all happening in the Asset Store within the unity engine. ANyone got a fix. I already tried to get the assets from the asset store on Google and it still doesnt work.
     
  42. PeppaDaWoundz

    PeppaDaWoundz

    Joined:
    May 16, 2019
    Posts:
    2
    Nevermind I fixed it
     
  43. LeoHoang2000

    LeoHoang2000

    Joined:
    May 16, 2019
    Posts:
    1
    Hey guys, so I'm almost done with this project and I'm really excited about that but something happened and I received this error message saying "
    Assets\Scripts\GameEnding.cs(23,19): error CS1061: 'Collider' does not contain a definition for 'GameObject' and no accessible extension method 'GameObject' accepting a first argument of type 'Collider' could be found (are you missing a using directive or an assembly reference?)
    " and I can no longer enter play mode, everything was working fine before and I have no idea what have I done to create this catastrophic mistake, none of my scripts seem to work anymore. Can someone help me out?
     
  44. ewanders

    ewanders

    Joined:
    May 16, 2019
    Posts:
    1
    Using Unity 2019.1 on a Mac. Same error with Unity 2018.4 When I try to import I keep getting an error:

    Failed to import package with error: Couldn't decompress package
    UnityEditor.Web.JSProxyMgro: Do Tasks()
     
    Last edited: May 17, 2019
    BillHimm likes this.
  45. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    227
    Could you pls elaborate a bit, I too just finished tut, nicely done tho I knew a lot of it already but still some I did not, but after done with script in pace. and I made sure my script matched and its perfect ( that I can see) - JohnLemon just stands there arms straight out, does nothing, no rotation or movement ( I tried wasd and cursor keys),,what likely is wrong ? No errors of anykind anywhere.

    Using very latest unity through hub.
    Btw while not a long time programmer, I grasp in it entirety everything that is going on so its not that.

    thx
     
    Last edited: May 18, 2019
  46. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    227
    HI,
    What do you mean none of your scripts seem to work anymore ?
    You may have inadvertently deleted something , a folder not sure, causing this.

    Do other scenes work , say load one you already had before this ?
     
  47. benfarrantsmith

    benfarrantsmith

    Joined:
    May 15, 2019
    Posts:
    4





    I Need Help.

    When I get caught by a gargoyle, it displays the "you made it" message instead.

    I have checked the references int the game-ending object and the POV object.

    I even checked if the images were the right way round.



    Does anyone have any advice?
     
  48. benfarrantsmith

    benfarrantsmith

    Joined:
    May 15, 2019
    Posts:
    4

    Fixed
     
  49. AdamDanielKing

    AdamDanielKing

    Joined:
    May 20, 2019
    Posts:
    3
    Hi,

    I am going through this tutorial, and new to Unity and programming.

    The "You Made It" screen displays permanently in play mode... can anyone point me in the right direction on how to fix this please?
     
    rudra1217 likes this.
  50. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    227
    Iv'e never heard of that, or haven't 'noticed',,what version of unity do you have, could you also show us a small ish screenshot ?