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

Опубликовано: 04 Сентябрь 2023
на канале: Game Dev By Kaupenjoe
6,456
215

In this Unity Tutorial we implementing a Line of Sight Script in Unity 2d using Raycast and Raycasting. Basically allowing the Player to hide behind Colliders and the Enemies to only follow if they have line of sight. This turns out to be quite easily done with Raycasts.

== LINKS ==
▶️ GitHub: https://github.com/Tutorials-By-Kaupe...
▶️ Starting Unity Package: https://url.kaupenjoe.net/gdbkj25/uni...
▶️ Unity Package: https://url.kaupenjoe.net/gdbkj26/uni...
▶️ Gist: https://url.kaupenjoe.net/gdbkj26/gist

== CREDITS ==
Character by: https://merchant-shade.itch.io/16x16-... by Merchant Shade under CC0
Tiles by: https://anokolisa.itch.io/dungeon-cra... by Anokolisa under CC0
Crab by https://camacebra.itch.io/crab-pixel-art by Camacebra under CC0
Bricks by https://bakudas.itch.io/generic-dunge... by Bakudas under CC0

== HASHTAGS ==
#kaupenjoe #unitytutorial #unity