How to make Line of Sight in Unity 2D with Raycast

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 13

  • @fudgemerchant
    @fudgemerchant Год назад +3

    Wow, this taught me so much in the span of just a few minutes. Thank you! Raycasting is gonna be super useful. I'm imagining it "should" work similarly in 3d probably. Hopefully...

    • @GameDevByKaupenjoe
      @GameDevByKaupenjoe  Год назад

      That's awesome to hear 😎💙 I am pretty sure the idea is exactly the same, just with that pesky added third dimension 🤣
      Currently, I am not brave enough to venture into that, but maybe at some point 🙏🏻

  • @yokami_9408
    @yokami_9408 4 месяца назад +1

    Waiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiit ! Kaupenjoe ! I remember following your minecraft tutorials :')

  • @ipga13
    @ipga13 Год назад +5

    back when i started unity, raycasts seemed very daunting because the syntax is so long, now it seems like second nature

    • @GameDevByKaupenjoe
      @GameDevByKaupenjoe  Год назад +3

      Ye, I can fully understand that. There can also be quite a few nuances to get right. But overall, they are really cool and pretty useful 😁

  • @emilian_spielt300
    @emilian_spielt300 9 месяцев назад +1

    very nice tutorial, helped me out a lot. i have a question to your unity, how can you see all of the "scene" stuff in your game view? you see the line of sight and the colliders and stuff like this.

  • @ArchAngelAzrael
    @ArchAngelAzrael Год назад +1

    Thank you!

    • @GameDevByKaupenjoe
      @GameDevByKaupenjoe  Год назад

      Absolutely, had a blast making the tutorial. Turned out really cool 😁😁

  • @GiangNguyen-ho5st
    @GiangNguyen-ho5st 7 месяцев назад +1

    Is it possible to make it so that when the player is out of sight, the enemy would still run to the last seen position to look for the player?

  • @asleepcat
    @asleepcat 6 месяцев назад

    Can you try to make this compatible with the ''A pathfinding'' project, because no matter how hard I try, I think I'm missing some things, can you please explain in detail how LOS would be compatible with this project, etc.? I won't say things like it's very watchable, but rest assured, I will watch the video until the end, even if it is 10 hours long. pls :'D

  • @georgekaragiozis3191
    @georgekaragiozis3191 Год назад

    Hey Kaupen!
    Could you make a simple AI that chases the player has lime of sight and when in range attacks the player (you can just make function Attack() or use comments in the video) in unity 3D with NavMeshAgent
    Great Video!

    • @GameDevByKaupenjoe
      @GameDevByKaupenjoe  Год назад +1

      Hey George,
      well I can definitely look into it - idk how fast I will be able to do something on this, but I have added it to my list of topics 🙏🏻🙏🏻

    • @georgekaragiozis3191
      @georgekaragiozis3191 Год назад

      @@GameDevByKaupenjoe Nice, thanks for responding.