# This.physics.world.wrap(...) is not working as in the examples

**URL:** <https://phaser.discourse.group/t/this-physics-world-wrap-is-not-working-as-in-the-examples/11649>\
**Category:** Phaser 3\
**Created:** [May 6, 2022, 2:10pm UTC](https://phaser.discourse.group/t/this-physics-world-wrap-is-not-working-as-in-the-examples/11649 "2022-05-06T14:10:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanchua00](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/ryanchua00/32/6492_2.png) [@ryanchua00](https://phaser.discourse.group/u/ryanchua00)\
**Post date:** [May 6, 2022, 2:10pm UTC](https://phaser.discourse.group/t/this-physics-world-wrap-is-not-working-as-in-the-examples/11649/1 "2022-05-06T14:10:53Z")

</div>

Hello, I’m new to Phaser, and I’m trying to follow a tutorial to wrap the sprite around after it exits the screen (something like asteroids). I believe i’ve checked the [Phaser physics arcade example on wrapping](https://io/examples/v3/view/physics/arcade/wrap-sprite), but the following line gives me the following typescript error.

```javascript
function update() {
    if (this.ship) {
        if (this.cursors.left.isDown) {
          this.ship.setAngularVelocity(-150);
        } else if (this.cursors.right.isDown) {
          this.ship.setAngularVelocity(150);
        } else {
          this.ship.setAngularVelocity(0);
        }

        if (this.cursors.up.isDown) {
          this.physics.velocityFromRotation(this.ship.rotation + 1.5, 100, this.ship.body.acceleration);
        } else {
          this.ship.setAcceleration(0);
        }

     this.physics.world.wrap(this.ship, 5); // <-- This line causes the error
    }
}

```

 ![Screenshot 2022-05-06 at 3.13.16 PM](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/c/c184c821c391cdf5601068a334e8b5eb0b350bf9.png)

I would greatly appreciate any advice!

---

<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:** [May 6, 2022, 2:14pm UTC](https://phaser.discourse.group/t/this-physics-world-wrap-is-not-working-as-in-the-examples/11649/2 "2022-05-06T14:14:02Z")

</div>

👋

Which Phaser version are you using?

---

<div class="post-metadata">

**Author:** ![ryanchua00](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/ryanchua00/32/6492_2.png) [@ryanchua00](https://phaser.discourse.group/u/ryanchua00)\
**Post date:** [May 7, 2022, 6:45am UTC](https://phaser.discourse.group/t/this-physics-world-wrap-is-not-working-as-in-the-examples/11649/4 "2022-05-07T06:45:45Z")

</div>

Thank you, I just updated it to the latest version 🙂
