FIRST PERSON INTERACTION in Unity!

Поділитися
Вставка
  • Опубліковано 15 чер 2023
  • In this tutorial we'll learn how to make an interaction system for first person games!
    LINKS
    Starter Project:
    github.com/tdawsondev/FirstPe...
    Outline asset:
    assetstore.unity.com/packages...
    Simple Items Pack:
    assetstore.unity.com/packages...
    Patreon:
    www.patreon.com/Kabungus

КОМЕНТАРІ • 20

  • @fernandodasilva-producoesa1023
    @fernandodasilva-producoesa1023 3 місяці тому +2

    Thank you very much for this tutorial, it saved me a lot of time on my final project as the previous tutorial made me having a problem with the outline working only after clicking for the first time in an object

  • @sofiansorin3632
    @sofiansorin3632 8 місяців тому +2

    Very nice video man! THX

  • @moshimoshi_04
    @moshimoshi_04 6 місяців тому

    Make more videos like this... I'm gonna support you man....

  • @riner_man
    @riner_man 11 місяців тому +2

    You best man, thank you very well

  • @fred1541
    @fred1541 3 місяці тому

    Amazing Thanks~

  • @SLRaiden
    @SLRaiden 5 місяців тому

    Good content broo awsome ❤

  • @md3d519
    @md3d519 2 місяці тому +2

    thanks for this but it would really help to explain the lines of code more thoroughly (just like you did for the if statements), more like explaining the logic behind each line in more of a beginner friendly manner. wish you the best

    • @radiantgames55
      @radiantgames55 21 день тому

      Well all he did was first create a script called Interactable (You will need to add this script to every single thing you wish to interact with in the game.) This script also contains a message which you will see when you go near it and a UnityEvent (Here in the inspector you attach the function which you wish to run when someone actually presses the interact button) basically what happens when someone interacts with your interactable. for a light switch you will attach the function which turns on the light.
      Then we create a new script called Player Interaction. This script is responsible for actually interacting with the object. Here we just shoot an imaginary line from the center of our screen (called a ray) and if that line hits the interactable object then we know that this is the object we need to interact with.
      Ofcourse there is more to this but this is the basic outline of the video.
      Let me know if this helps.

  • @RachelNitsche
    @RachelNitsche 3 місяці тому

    I really liked the Tutorial and therefore I subscribed. Thanks for really great video.

  • @JamesOfToya
    @JamesOfToya 3 місяці тому +2

    So... let's say nothing works on my end. What's the procedure?...

  • @Gsanchezbz
    @Gsanchezbz 5 місяців тому

    There is also a problem, if there is no collider, then the outline will be enabled until you collide with another object that has a collider, for that make sure to place a cube in your camera and place it on top of the raycast. that will solve the problem; xD edit: of course a collider which has another tag to make sure your script has "else{ disableOutline }"

  • @Whippynoodle1279
    @Whippynoodle1279 Місяць тому

    can it play a door animation

  • @Wesley3268
    @Wesley3268 2 місяці тому

    It doesn't work great for me, might because that I don't know where to put in the components, so, I replaced the raycast with a collider! I even made a object pickup system

  • @wareyl3591
    @wareyl3591 Місяць тому

    i did the exact same script and doesn't let me change anything in unity :')

  • @user-th1mt7bn5u
    @user-th1mt7bn5u 3 місяці тому

    Where is Outline script from?

  • @gottcha0330
    @gottcha0330 4 місяці тому

    is it just me or did he just jinx me with only giving me the interact script then telling me to place another script that "we" aprenetly made

  • @h0f333
    @h0f333 8 місяців тому +2

    hello, may I ask for the project?

  • @AaronNuts_
    @AaronNuts_ 4 місяці тому

    What does the error "The type or namespace name 'interactable' could not be found (are you missing a using directive or an assembly reference?)" mean?

    • @DjSL3ID3R
      @DjSL3ID3R 4 місяці тому

      You renamed or misspelled the script name or the class name (the thing before : MonoBehaviour). In the video the script name is capitalized so maybe check if your Script/Class is called Interactable and not interactable.