kinda like a forcefield...
possible to make a "one way" wall...
-
khoowaikeong
- Posts: 43
- Joined: Fri Jun 15, 2012 7:11 am
possible to make a "one way" wall...
a wall you can walk thru from one side, but not the other...
kinda like a forcefield...
kinda like a forcefield...
-
zarlox
- Posts: 31
- Joined: Tue Apr 26, 2011 5:52 pm
Re: possible to make a "one way" wall...
One possible way of doing this would be to use a collision callback. Inside the callback, you check your dynamic body and see which side of the object is he coming from (looking at velocity direction). Depending on the direction, you cancel the collision or you let it collide.
There might be better ways though.
There might be better ways though.
-
khoowaikeong
- Posts: 43
- Joined: Fri Jun 15, 2012 7:11 am
Re: possible to make a "one way" wall...
just an update, i follow the suggest and implemented it by overriding the response function in the dispatcher. it work great.
thanks for the idea!
thanks for the idea!