Drawing Lines with Mouse or Touch in Unity - LineRenderer and EdgeCollider2D

Published: 06 November 2022
on channel: ArmanDoesStuff
303
9

A simple and cheap way to draw LineRenderers and add EdgeCollider2Ds to them using the mouse (or touch if on mobile). Highly expandable and versatile gameplay mechanic.

Full code here. Updated with a few extra features: https://www.armandoesstuff.com/tutori...

Created for my upcoming game Hexagone: https://play.google.com/store/apps/de...

***

Thanks for watching and don't forget to subscribe and join the subreddit/discord.
Also, be sure to check out Above the Stars!
https://www.armandoesstuff.com/produc...

Website: https://www.armandoesstuff.com
Reddit:   / armandoesstuff  
Discord:   / discord  
Twitch:   / armandoesstuff  
Twitter:   / armandoesstuff  
Tumblr: https://www.tumblr.com/blog/armandoes...
Facebook:   / armandoesstuff  
#gamedev #tutorial #unity

***

00:00 Intro
00:34 Create Scene
01:14 Variables
01:46 Mouse State
03:16 Touch Start
04:43 Touch Drag
06:04 Above the Stars
06:20 Touch End
08:47 Outro


Watch video Drawing Lines with Mouse or Touch in Unity - LineRenderer and EdgeCollider2D online without registration, duration hours minute second in high quality. This video was added by user ArmanDoesStuff 06 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 303 once and liked it 9 people.