# Goign through walls

**URL:** <https://forum.kirupa.com/t/goign-through-walls/113454>\
**Category:** Uncategorized\
**Created:** [June 18, 2004, 2:31am UTC](https://forum.kirupa.com/t/goign-through-walls/113454 "2004-06-18T02:31:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Towlie](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@Towlie](https://forum.kirupa.com/u/Towlie)\
**Post date:** [June 18, 2004, 2:31am UTC](https://forum.kirupa.com/t/goign-through-walls/113454/1 "2004-06-18T02:31:48Z")

</div>

I have this game where you are sent flying p[retty fast and your supposed to like stop dead when you hit a wall. but it seems if the force is fast enough it will fly through the wall.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 18, 2004, 3:05am UTC](https://forum.kirupa.com/t/goign-through-walls/113454/2 "2004-06-18T03:05:31Z")

</div>

Try this:

oldX = this.\_x;//In the beginning

//then after you move it and all  
if((oldX \< \_root.thisIsWhereYouPutTheWall.\_x) && (this.\_x \> \_root.sameWall.\_x)){  
this.\_x = \_root.sameWall.\_x;  
\_root.yourSpeedVariable = 0;  
}

something like that
