# Cannon.js - How to prevent a PhysicsImpostor from moving due to collision

**URL:** <https://forum.babylonjs.com/t/cannon-js-how-to-prevent-a-physicsimpostor-from-moving-due-to-collision/2735>\
**Category:** Questions\
**Created:** [April 23, 2019, 10:26pm UTC](https://forum.babylonjs.com/t/cannon-js-how-to-prevent-a-physicsimpostor-from-moving-due-to-collision/2735 "2019-04-23T22:26:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abstract](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/abstract/32/1880_2.png) [@Abstract](https://forum.babylonjs.com/u/Abstract)\
**Post date:** [April 23, 2019, 10:26pm UTC](https://forum.babylonjs.com/t/cannon-js-how-to-prevent-a-physicsimpostor-from-moving-due-to-collision/2735/1 "2019-04-23T22:26:20Z")

</div>

How do I prevent a PhysicsImpostor from moving even if another PhysicsImpostor collides with it. Setting the mass to 9999999 isn’t a good way.

I tried PhysicsImpostor.sleep() and it partially works by simply just stopping it from falling down from gravity, however if my player character collides with the entity it will move.

I want to turn off the meshes response to other things colliding with it. However I still want it to have collision. It would be essentially a map prop that only serves as a static mesh.  
Think of counter strike, how the boxes in de\_dust2 you can collide with, but it doesn’t move ever.

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [April 23, 2019, 10:50pm UTC](https://forum.babylonjs.com/t/cannon-js-how-to-prevent-a-physicsimpostor-from-moving-due-to-collision/2735/2 "2019-04-23T22:50:42Z")

</div>

Set mass of immovable impostor to 0

---

<div class="post-metadata">

**Author:** ![Abstract](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/abstract/32/1880_2.png) [@Abstract](https://forum.babylonjs.com/u/Abstract)\
**Post date:** [April 24, 2019, 1:57pm UTC](https://forum.babylonjs.com/t/cannon-js-how-to-prevent-a-physicsimpostor-from-moving-due-to-collision/2735/3 "2019-04-24T13:57:14Z")

</div>

@JohnK Thank you so much.
