Search Unity

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

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

  1. Fil04

    Fil04

    Joined:
    Aug 28, 2019
    Posts:
    1
    Hello,

    Im new to unity with a little bit of experience in C++ and python

    Im encountering an error where none of my endings are triggered, not the GameEnding gameObject or the gargoyles are recognising that I've been in there capsule collider. I haven't got to the ghosts yet but I got feeling that they wont work either, my code is a carbon copy of the tutorial so it is probably something in the inspector but I have no clue..

    I'm using Unity 2019.1.14f1 Personal if you need that and I've just finished Enemies, Part 1: Static Observers

    Thank you for any help...
     
    Last edited: Aug 28, 2019
    DRY1994 likes this.
  2. Burrito-Bob

    Burrito-Bob

    Joined:
    Aug 30, 2019
    Posts:
    1
    Thanks for this very nice tutorial.

    I am stuck at Enemies, Part 1, at the last step. Unity keeps saying:

    "Assets\Scripts\Observer.cs(33,13): error CS0246: The type or namespace name 'Raycasthit' could not be found (are you missing a using directive or an assembly reference?)"

    I doublechecked the scripts for typos, but found None so far.

    Can anybody help please?

    Thanks.

    Found the typo: 'RaycastHit', not 'Raycasthit'
     
    Last edited: Aug 30, 2019
  3. studio-3D

    studio-3D

    Joined:
    Sep 6, 2019
    Posts:
    1
    I've gotten up to Enemies Part 2, but I'm now getting an error ALL COMPILER ERRORS MUST BE FIXED BEFORE ENTERING PLAYMODE. Of course, I have no idea where to find the error. The last script said no errors, but there was no FINAL one to use/check. Any idea what I might do now (download completed?) thanks
     
  4. VictorLuccasSVL

    VictorLuccasSVL

    Joined:
    Sep 11, 2019
    Posts:
    8
    I feel like the second problem can't be fixed for some reason, but i would really like to understand why this is happening. Maybe weird interaction with physics?
     
  5. Ethanbuxton

    Ethanbuxton

    Joined:
    Sep 14, 2019
    Posts:
    2
    Did you find out how to solve??
     
  6. Harbinger-Czar

    Harbinger-Czar

    Joined:
    Jun 25, 2018
    Posts:
    7
    I'm having an issue where my PointOfView objects aren't moving with the ghost objects. How do I fix this?
     
  7. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Did you drag the PointOfView Prefab onto the Ghost GameObject?
    upload_2019-9-16_18-9-57.png
     
  8. meadowc

    meadowc

    Joined:
    Sep 25, 2019
    Posts:
    1
    Have you resolved this problem.. I am having the identical problem.
     
  9. tialim

    tialim

    Joined:
    Sep 24, 2018
    Posts:
    1
    thaank you!
     
  10. unity_KxJVdVWa2dGFRQ

    unity_KxJVdVWa2dGFRQ

    Joined:
    Oct 15, 2019
    Posts:
    1
    i have a question. i am coming from ue4 so this is somewhat new for me. i am trying to learn the basics from unity but one question i have is how to add real gravity?. i mean as soon as you set "apply root motion" true john do not fall down in any way. i do not really mind but i am a person who do not like to work precise so i could run the gravity and when then player sees the character it is on the ground even if i put it above it in the editor. i am hoping for help.
     
  11. Deleted User

    Deleted User

    Guest

    Hi,

    I'm beginning this project with Unity 2020.1. alpha.

    It's the best way I've found to test the new versions of Unity; I've done that already with the Ruby's Adventure: 2D beginner project and everything went fine. :)
     
  12. RedRecidivist

    RedRecidivist

    Joined:
    Nov 22, 2018
    Posts:
    9
    As others have said, this is a really great tutorial, thank you.

    In "Create a Trigger to Simulate the Gargoyle's Line of Sight", I'm finding that after following the instructions carefully, the transform position of my PointOfView GameObject is in the centre of the capsule collider, not at the end of it. I went through the steps twice. I'm guessing this could cause a bug later since the raycast will probably come from the wrong place.

    Maybe I missed something?

    Thanks again for this fantastic resource.

    Annotation 2019-11-13 214734.jpg
     
  13. Deleted User

    Deleted User

    Guest

    Just above your scene view, change the "Center" button into "Pivot" and see what happens.
     
    RedRecidivist likes this.
  14. RedRecidivist

    RedRecidivist

    Joined:
    Nov 22, 2018
    Posts:
    9
    Oh! That's really interesting, and I understand. Thank you!
     
  15. RedRecidivist

    RedRecidivist

    Joined:
    Nov 22, 2018
    Posts:
    9
    Well, I finished the project, it build successfully on PC, and played fine. I wanted to see if it would build for Android, so I changed player to Android, changed the Android API version and renderer and it built fine. I thought "hmm, that's cool!" and then switched back to the PC player. I never changed any settings at all for the PC player from the point that it worked fine, but now it just gives me a grey screen with audio but no image when I build for PC. It still works fine in the editor.

    Bit of a shame after all that work, but at least I got to see it run properly once!
     
  16. Therhyno25

    Therhyno25

    Joined:
    Dec 2, 2015
    Posts:
    1
    There is something I don't understand from the tutorial, in the "Player Character: Part 2, in section
    13.Apply Movement and Rotation to your Character, it says :
    "The character has a fun Walk animation and it would be good to use the root motion for that. However, the animation doesn’t have any turning in it and if you tried to turn the Rigidbody in the Update method it might get overridden by the animation (which could lead to the character not turning when it should). "
    I thought the animation only affects the display of the character, but they say that the lack of turning there may over-ride my rotation(so I need to do it in a function called OnAnimatorMove. does the animation actually change values of the rigidbody? Thanks!
     
  17. ProjectRabbid

    ProjectRabbid

    Joined:
    Dec 1, 2019
    Posts:
    1
    I can't get the character to move.

    The warning says

    "Animator is not playing an AnimatorController "
     
  18. Deleted User

    Deleted User

    Guest

    You skipped a step and forgot to add the controller to the animator.
     
  19. HernandoNJ

    HernandoNJ

    Joined:
    May 13, 2018
    Posts:
    75
    It is a great beginner course! It let me understand so many things about game development. Thank you very much! Great job!
     
  20. Glactus

    Glactus

    Joined:
    Dec 25, 2019
    Posts:
    1
    A bit late, but did you check so that the actual Observer script is assigned to the Ghost's PointOfView object in the Hierarchy? If not just drag and drop it from the Assets > Scripts > Observer to the Ghost Prefabs PointOfView!
     
  21. xiaolan706

    xiaolan706

    Joined:
    Jan 5, 2020
    Posts:
    7
    Hi Dan,

    I have the same issue as yours. Did you get any solution?

    Thanks,
    Jin
     
  22. scotty417

    scotty417

    Joined:
    Jan 25, 2020
    Posts:
    3
    I'm running into problems here. I started out using the tutorial and everything went well until I got stuck.
    I decided to start all over again, and I've been having problems ever since.

    In the tutorial, I'm being shown that there's Rendering Mask, etc. My version isn't showing it.

    I am using Unity 2019.2.

    I enclosed a screenshot of a problem that I ultimately fixed and didn't know how to eliminate it from this post.

    Thanks,
    Scott
     

    Attached Files:

  23. scotty417

    scotty417

    Joined:
    Jan 25, 2020
    Posts:
    3
    I'm not worried about the above problem anymore. My new problem is in Animation. I have done everything to get John Lemon animated. My problem is that I'm supposed to hit the play button and I can move him around. I try to click the play button, but it doesn't stay depressed. I've looked at the script and it's exactly like they show it.
     
  24. scotty417

    scotty417

    Joined:
    Jan 25, 2020
    Posts:
    3
    Never mind. I'm being an idiot. It's amazing what happens if you check your code more than once.
     
  25. xiao_pi

    xiao_pi

    Joined:
    Jan 31, 2020
    Posts:
    1
    I tried this tutorial, but the GameEnding didn't work. I played the game, when I ran into the ghost, the game didn't end. Dose anyone have answer for that? Thanks in advance.
     
  26. loop67

    loop67

    Joined:
    Feb 4, 2020
    Posts:
    1
    Hello, i encountered a problem at part 1, 11.Make your Character React to Physics, when i add rigidbody, instead of falling a short distance and stopping, the character falls a short distance and starts floating upwards. And after changingthe update mode from normal to animate physics, it doesn't even fall, just the idle animation plays. I couldn't figure out what causes this. My current version is 2018.4.16f1.
     
    Last edited: Feb 5, 2020
  27. Tigersong

    Tigersong

    Joined:
    Aug 11, 2014
    Posts:
    73
    I know this project is supposed to be for Unity 2019.1; fair enough. But what changed? I have 2019.3 and each time I get errors from the package com.unity.package-manager-ui, which is absent. Also, why does a single-player project include the Multiplayer package?
     
  28. rbaxter_unity

    rbaxter_unity

    Joined:
    Feb 12, 2020
    Posts:
    2
    I've completed everything up to the Build, Run, Distribute step, but I have an issue with my ghosts. The first one moves back and forth just fine between the waypoints, but the others keep getting stuck, and I get this error:

    IndexOutOfRangeException: Index was outside the bounds of the array.
    WaypointPatrol.Update () (at Assets/Scripts/WaypointPatrol.cs:25)

    I'm not sure what I can do about this. Please help if you can. Thanks!
     
  29. rbaxter_unity

    rbaxter_unity

    Joined:
    Feb 12, 2020
    Posts:
    2
    Nevermind, it was literally as simple of fixing a misplaced end parenthesis. Remember to always double-check your code, kids!
     
  30. Tigersong

    Tigersong

    Joined:
    Aug 11, 2014
    Posts:
    73
    I've got in error in Observer: "An object reference is required for the non-static field, method, or property 'GameEnding.CaughtPlayer()'".

    Code (CSharp):
    1. if (Physics.Raycast(ray, out raycastHit))
    2.             {
    3.                 if (raycastHit.collider.transform == player)
    4.                 {
    5.                     GameEnding.CaughtPlayer();
    6.                 }
    7.             }
    I also notice a blank field in the Inspector called "Game Ending"; that probably has something to do with it.
     
  31. QingQingYe

    QingQingYe

    Joined:
    May 29, 2019
    Posts:
    1

    I encountered the same problem, and I discovered that I add the script to the 'JohnLemon' inside the real 'JohnLemon' GameObject (remember that inside the 'JohnLemon' GameObject, there are another 'JohnLemon' and the 'Root'). That's the reason why it can't find the Animator object (because the Animator belongs to the 'outside' JohnLemon).

    If you drag the script to the scene, this situation is likely to happen.

    Hope this helps~
     
    JZ_Zhang likes this.
  32. 860000023

    860000023

    Joined:
    Jun 2, 2015
    Posts:
    1
    Hello everyone. I encountered a problem in Tutorial 6. When I create a UI. The image is not in the position indicated by the Rectangle tool. But I cannot find the Effects button. I'm unity in 2019.3. Can someone help me
     
  33. PKgamedesign

    PKgamedesign

    Joined:
    Apr 7, 2020
    Posts:
    1
    Hi,
    I've got stuck in tutorial 7 (Enemies, Part 1: Static Observers).
    I have checked my code several times and can't see the fault but when I go to Unity it tells me there's a compiler error.
    I'm unable to drag the PointOfView GameObject onto the Inspector.
    Any help much appreciated, thanks so much, Kayla

    Assets\Scripts\Observer.cs(22,14): error CS0111: Type 'Observer' already defines a member called 'OnTriggerEnter' with the same parameter types
    I am assuming it is the game object issue on John Lemon, but I cannot figure out how to fix it. Anyone know how to fix this
     

    Attached Files:

    Last edited: Apr 7, 2020
  34. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Observer script - Line 22
    You copied and pasted the OnTriggerEnter method and changed true to false but you didn’t change Enter to Exit.
     
  35. trapdoorair

    trapdoorair

    Joined:
    Mar 29, 2020
    Posts:
    1
    Evening everyone.

    I am currently at 'Tutorial 8 - Enemies, Part 2: Dynamic Observers.

    Throughout the tutorials, any errors with the code for example I have found to be my own, either typos or misreading small parts of the code.

    My problem now is that, while the Observer script seems to run fine for the gargoyles, the 'PointOfView' component does not seem attached to the ghosts, and in fact for the first ghost, I'm 'caught' when going into the room it spawns in, not in front of the ghost itself.

    So, I assume that script in and of itself works fine, as it seems to otherwise, probably a mistake of my own, have tried a few things already. Have I just missed something obvious? Would appreciate any feedback, thanks in advance.
     
  36. Oneirois

    Oneirois

    Joined:
    Apr 15, 2020
    Posts:
    1
    Hello!
    So I'm currently working on chapter 4 on the tutorial. I've noticed that when the character collides with another object (like the walls), it starts floating around and gliding and the move commands do not work properly anymore... I would appreciate if anyone could tell me what the cause of this issue is... The script is exactly as what was given and I followed all steps diligently (or so I think).
     
  37. cotsweb

    cotsweb

    Joined:
    May 1, 2020
    Posts:
    2
    I am stuck on the Add the environment step.
    I got the walking working fine and when I add the Level Prefab I can see John Lemon standing in the hallway.
    But when I go to Game mode I don't see John Lemon, I am just looking out a window at the rain outside, I think it may be the window behind John Lemon in the hallway but I am not sure.
    Have I set something set wrong? The code all looks good, I even did a file compare to check it against the model and everything is fine until I add the Level prefab.
    I am using 2019.3.12f1
     
  38. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    That’s as it should be. Carry on with tutorial. When you get to end of Part 4 in The Camera tutorial and test the game, you will be focused on John Lemon and you’ll be able to move him around the house.
     
  39. vviking

    vviking

    Joined:
    Mar 9, 2016
    Posts:
    3
    Greetings,
    I am having the exact same issue, - it appears that the "Observer" remains stationary where the ghosts first spawn, and do not move WITH the ghosts doing their triggering business. I suspect a problem with regards to prefab/instance .. and will explore a bit further on my side..
    But, did you ever find a solution to this problem yourself? I'm curious ;)
     
  40. Squiddy_9

    Squiddy_9

    Joined:
    May 4, 2020
    Posts:
    1
    I have just done the coding part of the second tutorial but John is not reacting to any inputs that I give.
    help
    ps i copied the code from the tutorial
     
  41. cotsweb

    cotsweb

    Joined:
    May 1, 2020
    Posts:
    2
    Thanks for that, I didn't realise
     
  42. W0lff93

    W0lff93

    Joined:
    May 6, 2020
    Posts:
    1
    Hi There,

    Thank you so much for the lesson, it's been super helpful so far.

    I have a unique issue. When I hit play after Part 2 where you create the PlayerMovement script, everything works fine, except when I leave the controls, LJ walks towards the camera on his own.

    Please help?
     
  43. Deleted User

    Deleted User

    Guest

    This is very fun and the tutorial is helpful but I've run into a problem which occurs in The Player Character: Part 1.

    I'm on the "2. Add a Character Model" step 4. When I find the JohnLemon GameObject in the Hierarchy window, I don't see a blue square with a paper icon. What should I do?
     
  44. Falke-3D

    Falke-3D

    Joined:
    Jun 1, 2020
    Posts:
    6
    Hello,

    I am a beginner, and already in part 1
    "11. Let your character react to physics"
    Problems with "All compiler errors ..."
    When prompted by the tutorial to press the play button.

    So far I haven't found anything helpful to solve the problem.

    I have the latest version of Unity and I think there are problems with it.

    I ask for help !
     
  45. Drebb_Nacho

    Drebb_Nacho

    Joined:
    Jun 17, 2020
    Posts:
    1
    I got that as well, as this is from 2019 you probably fixed it Idk.
    But a way to fix this is under the John Lemon hierarchy there is another John Lemon tab, just add an animator to that and the errors will go away.
     

    Attached Files:

  46. zenku90210

    zenku90210

    Joined:
    Jun 21, 2020
    Posts:
    1
    Did you create a state machine ? It sounds like he is stuck in idle..
     
  47. kevland01

    kevland01

    Joined:
    Jul 2, 2020
    Posts:
    1
    SOLVED!!!! I finally figured out the issue. The script was placed on a level down within the JohnLemon model. If you drag and drop the script directly to the model, it places it on a lower level. When you drag and drop the script, place it on the model in the HIERARCHY panel and be sure to attach it to the top level of the model. The script will work and the player will move.
    upload_2020-7-2_18-32-36.png
     
  48. Lucifer656

    Lucifer656

    Joined:
    Jul 15, 2020
    Posts:
    7
    Very late to the party, but was still wondering. How to make cinematic virtual camera rotate based on player's rotation?
     
  49. charleslehman20

    charleslehman20

    Joined:
    Jul 22, 2020
    Posts:
    1
    it is my first time writing this script for my player movement in the john lemon's project and cant seem to play it. it shows me the pop up message for error from compiler to enter play mode please help. upload_2020-7-22_18-31-43.png
     
  50. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    The Player Character: Part 1 - 6. Create the Animator Controller - Step 5
    Player Character: Part 2 - 10. Set up the reference to the Animator component
    Check Lines 33 and 34 of your code.

    Also, check Lines 8, 18, 19 and 37 for spelling and capitalisation.
     
    Last edited: Jul 23, 2020