Question by
MobinYaqoob · Nov 09, 2016 at 02:27 PM ·
unity 52dlinerendererjoints
Round a Line around a round thing
I have different objects on my scene
Bomb
Moon
Ball
Plateform
So I want to create a line through plateform to moon and then bomb and then when it comes to ball the line goes round it . Line controlled by Mouse. like
The boomb and moon line are easy to achieve which I does very easily from adding a point to array between frist and second point of line
private void MakeLineCustomFromList(Transform first,Transform second,Transform third)
{
listOfObjects = new List<Vector2>();
listOfObjects.Add(first.position);
listOfObjects.Add(second.position);
listOfObjects.Add(second.position);
listOfObjects.Add(third.position);
//listOfObjects.Add(third.position); <--Uncomment to complete circuit.
//listOfObjects.Add(first.position); <--Uncomment to complete circuit.
lineWithListCustom = new VectorLine("dsd", listOfObjects, 0.3f);
lineWithListCustom.Draw();
}
When it becomes to round around the ball i did't figure out how to do that so that is create the round effect like image below number 2 image.
also similar effect used by a very famous game "Pull my Tounge"
https://play.google.com/store/apps/details?id=com.noodlecake.pullmytongue&hl=en
So that I it looks like the line is wrapped around it.
ice-screenshot-20161109-185622.png
(50.1 kB)
2.png
(51.7 kB)
Comment