#Raycasting
1 messages · Page 1 of 1 (latest)
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 Ray...
This video is really good.
Linecasting is especially good for object triggers.
That video... has had so many hours watchtime from me :p
An example I have is my main door handle. it starts locked.
makes sense why whenever i press the interact button form anywhere that it plays the locked sound. The door is locked and I'm pressing the interact key hence playing the sound from anywhere
How can i do it so it only plays when interacting with the handle itself
I've tried days to trouble shoot. re wrote my script. tried the getcomponent<scriptwithraycast> and use the raycast hit to maybe see if that works. It didnt :/