MENU

Fun & Interesting

Raycasts in Unity (made easy)

Game Dev Beginner 109,577 lượt xem 2 years ago
Video Not Working? Fix It Now

Want to know how to CODE in Unity? Get my course here: https://www.udemy.com/course/how-to-code-in-unity/?referralCode=7D4BCF4F86A840FB720B

Learn how to use the Raycast function in Unity.

00:00 Intro
00:57 Creating a Ray
02:33 The Raycast Hit variable
03:11 The Raycast function
04:48 Layermasks
07:10 How to exclude Trigger Colliders
08:26 Raycast All
10:03 Raycast Non-Alloc
10:30 Other types of Raycast
13:32 Raycast in 2D
16:00 Outro

You'll learn how to create Rays, how to use Raycast Hit data from collisions when they happen and how all the different types of Raycast function work.

Read my full article here: https://gamedevbeginner.com/raycasts-in-unity-made-easy/

Outro music: New Year by Bad Snacks

Unity icons created by Freepik - https://www.flaticon.com/free-icons/unity
Cursor icons created by Pixel perfect - https://www.flaticon.com/free-icons/cursor
Chalkboard image - School rules photo created by kjpargeter: https://www.freepik.com/photos/school-rules

Comment