---
description: Group的移动
---

# MovingGroupToDestination

{% file src="https://3378841769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvb7a7iWx8OZAGPxzbEZJ%2Fuploads%2Fe7qFOgUi5gkYZsEi39bH%2FMovingGroupToDestination.mp4?alt=media&token=e0c4f684-8b9b-42c4-9b00-4bf75fc73191" %}
MovingGroupToDestination
{% endfile %}

```python
from manim import *

class MovingGroupToDestination(Scene):
    def construct(self):
        group = VGroup(Dot(LEFT), Dot(ORIGIN), Dot(RIGHT, color=RED), Dot(2 * RIGHT)).scale(1.4)
        dest = Dot([4, 3, 0], color=YELLOW)
        self.add(group, dest)
        self.play(group.animate.shift(dest.get_center() - group[2].get_center()))
        self.wait(0.5)
```
