# Follow character

**URL:** https://phaser.discourse.group/t/follow-character/12000
**Category:** Phaser 3
**Created:** [July 9, 2022, 3:53pm UTC](https://phaser.discourse.group/t/follow-character/12000 "2022-07-09T15:53:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thiagobeta](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@thiagobeta](https://phaser.discourse.group/u/thiagobeta)
#### Post date: [July 9, 2022, 3:53pm UTC](https://phaser.discourse.group/t/follow-character/12000/1 "2022-07-09T15:53:48Z")

</div>

Hello, how are you?  
I’m new to the world of game creation and I’m starting with Phaser 3.  
My enemies are in the form “this.groupEnemy = this.physics.add.group()” and are following the player using the code [update] "if(this.nEnemies\>0){

```
       let enemies = this.enemygroup.getChildren()
       this.seguePlayer(enemies)

```

[create]  
“this.seguePlayer = (enemy) =\>{  
for(var i = 0; i\< enemy.length;i++)  
this.physics.moveToObject(enemy[i], this.player, 200);  
}”

Is there a faster and safer way?  
thanks.

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [July 13, 2022, 3:18pm UTC](https://phaser.discourse.group/t/follow-character/12000/2 "2022-07-13T15:18:39Z")

</div>

That’s fine.
