How to Detect COLLISIONS on a Line Renderer in Unity

Описание к видео How to Detect COLLISIONS on a Line Renderer in Unity

In this Unity Tutorial I will show you how to write a C# script to add collisions to a line renderer component. The polygon Collider 2D is a powerful component in Unity, which with the correct algorithm can be leveraged to get your lines interacting with Unity’s rigidbody physics system in no time!

This is part 4 in my Line Renderer Series, be sure to check out the others for a deeper explanation for the Line Controller script and the Shape Drawing tool I made in previous videos.

Link to download the code for all my line renderer projects: https://tobyrcod.itch.io/linerenderse...

Timestamps:
00:00 - Intro
00:20 - Line Controller Script
01:21 - Line Collision for 2 Points
02:19 Collider Points Algorithm
04:24 - Adding the Polygon Collider 2D
05:55 - Line Collisions for any number of points
08:28 - Outro

Huge thank you to the amazing AndrewDavidJ for making the thumbnail of this video:    / andrewdavidj  

Комментарии

Информация по комментариям в разработке