Unity Raycasting - 4 Examples

https://www.youtube.com/watc...
4 simple examples of using raycasting, C#, and the Unity game engine. FPS or first-person shooting, selecting objects with a mouse, moving objects with a mouse, and checking is grounded for simple jumping. Sebastian Lague's Platformer Series: https://www.youtube.com/playlist?list=PLFt_AvWsXl0f0hqURlhyIoAabKPgRsqjz Want to support the Channel? ******************************* Shop the Unity Asset Store (affiliate): https://assetstore.unity.com/top-assets/top-paid?aid=1100lHSw Become A Channel Member: https://www.youtube.com/channel/UCkr9CPPqT9VWUjkpo3HcACg/join Or a Patron: https://www.patreon.com/onewheelstudio Grab a T-Shirt: https://onewheelstudio.com/merch/ My video and streaming kit: https://kit.co/onewheelstudio/tutorial-video-production Buy a Game Design Book: https://kit.co/onewheelstudio/game-design-reading-list-unity-c-blender-and-more Video Gear List (Amazon Affiliate) *********************************** Sony A6100 Camera: https://amzn.to/32logXz Camera Lens: https://amzn.to/3KA4Wr4 GoXLR (audio interface): https://amzn.to/35dmr03 Shure SM7B Mic: https://amzn.to/3fNbV1E Blue Mic Arm: https://amzn.to/3tHgwdQ Neewer Light: https://amzn.to/3rD8eRv Light Softbox: https://amzn.to/3GUaHgQ Neewer RGB Light: https://amzn.to/3rCTQJ9 Other Links ************ Discord: http://discord.onewheelstudio.com Twitter: https://twitter.com/OneWheelStudio Devlog: https://onewheelstudio.com/ Twitch: https://go.twitch.tv/onewheelstudio Timestamps ************* 0:00 What is Raycasting? 0:22 Things You Should Know 1:10 The Raycast Function 1:48 Using Rays 2:09 FPS Shooting 4:22 Selecting & Clicking on Objects 5:53 Debug Draw Line 6:25 Moving Objects with Mouse 8:18 Jumping - Check is Grounded 10:02 RaycastHit 10:50 Infinite Distance 11:14 Raycast Performance 11:52 THE END #GameDevelopment #Unity3D #raycasting #indiedeveloper