0

I want to acheive the result shown in picture Path Creation Like This. I have used line renderer in my other game where you save the dogs by drawing the line. In this game dogs have rigidbody and colliders and stays inside the line. Do I have to use line renderer to achieve the following result or there is some other way to do so?

I used Line renderer but how can I make the dogs stay in the line? When I create the second line it intersects with the first line. I want all the line paths to merge that player creates. Or I am using the wrong approach to get the result. Or there is a way to change the sprite according to player mouse drag and make a path?

1 Answers1

0

I see two ways of doing it:

1 - You fill the screen with tiny colliders that blocks the dogs movement. When you touch this colliders with your finger they are destroyed and path is freed

2 - You change the dogs physics: Create a script to move the dogs only when inside a collider trigger, so while you are touching the screen you keep adding circle colliders triggers in the finger position, creating the path

Renan Ruan
  • 136
  • 7