# Connect gameobject to previous gameobject after rotating

I've made an algorithm to generate triangles and connect each to the previous triangles, now, though, I'm trying to add some rotation to each triangle, but by doing so each triangle isn't touching the previous triangle.

So my question is, how do I keep the triangles connected even though I rotate them? So far I've added a pivot in the middle of the left side of each triangle (They're connected to each other on the right side), and rotating the pivot (Or parent of the triangle) using this equation:

```
pivot.transform.Rotate(Vector3.up, (i + 1) * 360f / triangles);
```

But by only using this, the triangles don't get a new position, so they just rotate around their pivot.

Ps. I'd probably add, that I'm trying to make a circle of triangles.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

### Follow this Question

### Related Questions

How to generate assets along a vector3 0 Answers

How to calculate the vertices of an icosphere 1 Answer

how to calculate the angle between two vectors? 6 Answers

Acquiring a negative angle? 1 Answer

Gravity To CharacterController 0 Answers