# GameObject "jumps" through collision objects

**URL:** <https://phaser.discourse.group/t/gameobject-jumps-through-collision-objects/9677>\
**Category:** Phaser 3\
**Created:** [May 26, 2021, 11:14pm UTC](https://phaser.discourse.group/t/gameobject-jumps-through-collision-objects/9677 "2021-05-26T23:14:07Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Milton](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Milton](https://phaser.discourse.group/u/Milton)\
**Post date:** [May 27, 2021, 8:26pm UTC](https://phaser.discourse.group/t/gameobject-jumps-through-collision-objects/9677/7 "2021-05-27T20:26:06Z")

</div>

I don’t know, but you can copy the arcade code, which is trivial:

```javascript
var angle = Math.atan2(y - gameObject.y, x - gameObject.x);
speed = DistanceBetween(gameObject.x, gameObject.y, x, y) / (maxTime / 1000);
gameObject.body.velocity.setToPolar(angle, speed);

```

(use the [actual](https://github.com/photonstorm/phaser/tree/v3.51.0/src/physics/arcade/ArcadePhysics.js#L515) code, this is just the relevant stuff)

---

_[View the full topic](https://phaser.discourse.group/t/gameobject-jumps-through-collision-objects/9677)._
