This is the official thread for discussion, issues and Q&A for the Let’s Try tutorial assignments.
Please use this thread if you have any questions, issues or feedback on this series.
The Let’s Try series is a set of tutorials on our Learn Site:
In our Let’s Try series of tutorials we will explore popular game mechanics in standalone assignments. Instead of creating an entire game, we will focus on a single mechanic and the techniques needed to implement it.
Post your questions and the team and we will try to help you out!
IMPORTANT:
If you want to post a script you are having trouble with, please post the whole script that is throwing an error using proper code formatting detailed in the thread below, a screenshot of the public variables in the inspector and copy and paste the error message from the console if there is one.
Known Issues:
Please turn “annotations” on, as we try to annotate these videos if any issues are found. Many people turn annotations off, and miss these comments.
is that the web link for the asset store showing Open in Unity? as it wont give option for download until you have the asset store open within the editor. (i believe)
Should ask you to download once you opened it in Unity, then once downloaded the button will change to Import.
or, with Unity editor open, go to Window > Asset Store and search for ‘Lets try’ from Unity Technologies and it should download and Import from there.
Hi, I’m having trouble dragging the GunEnd game object into the Gun End field in the Raycastshoot (script) section of the inspector menu as the Gun End field isn’t there! Help!
It seems that the raycast is interacting with the character’s collider. Look at the Character Controller component for the FPSController GameObject in the Scene:
If you want to see this in-game, alter your RayCastShoot script to redraw laserLine every update (so you won’t have to switch back to the Game view and click to see the results). For example, I changed the first few lines of the Update() function in RayCastShoot.cs to this:
If you play with the Radius, Height, or Center options on the Character Controller, you can see when the laserLine starts/stops interacting with the character’s collider.
The fix is simple: Change the Layer of the FPSController to “IgnoreRaycast.” When the dialog asks you if you want to change the children, say No. It isn’t necessary to change the child objects to fix this issue.
Side note: I don’t yet understand why the ray is being cast back into the camera when this interaction happens. There may be some underlying issue that I haven’t discovered yet, but ignoring raycasts onto the character’s collider seems to solve the obvious problem.
I’m starting the tutorial and when told to put the C# script into the gun prephab it says
“Can’t add script component ‘RaycastShoot’ because the script class cannot be found”
what can I do?