#Line renderer destroy when collides with itself?

1 messages · Page 1 of 1 (latest)

lone lynx
#

Hi there, i'm just enter in this server searching some help. I'm currently making a 2D Project that wants to emulate the Pokémon Ranger's gameplay (in short terms, sorrounding monsters with circles and catching with them). At the moment I've created a GameObject called LineDrawer with a LineRenderer, an EdgeCollider 2D and a script that manage the line and destroy it when collides with itself.

Unfortunately, as you can see, the result is this. Line is created successfully, and when left mouse button is pressed, is creating a new line (as I want). But I can't get the line to destroy when it collides with itself. How can I fix this?

#

These are the components and the script LineDrawer:

cunning rampart
#

!code

cyan cometBOT
#
Posting code

📃 Large Code Blocks
Large code blocks should be posted as links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/
https://paste.myst.rs/, https://hastebin.com/

📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To get C# formatting the first line should only contain cs or csharp.
Add a comment with a line number if there is an error message.
```cs
// Your code here
```
Do not share screenshots of code unless requested.