- Home /
Unity2D show only part of line structure that player touches / collides with
I'm searching for a way to create (smooth) line structures that are initially invisible to the player, but once the player collides with the lines they become visible (but only where the player has collided with the line).
The image below shows the basic principle, the black line is visible to the player since he has moved the playerobject along the line (touched the line), the remaining part (grey) remains invisible to the player until he collides with it.
I could use the line renderer and edge colliders but I want to be able to create smooth (curved) line structures and only make the parts visible where the player has touched them.
Your answer
Follow this Question
Related Questions
How can I hide an object line rendered in a minicam? 1 Answer
Cannot Hide Player 1 Answer
Public variable not appearing in the inspector (C#) 2 Answers
Hide mouse cursor 3 Answers