I would like to do something rather odd in my game, and while it may be possible I expect it would be way too much work... regardless, this is the place I should come to ask. Bare with me if I am confusing...
I would like to use some bodies in an opposite fashon... I would like some bodies to have other bodies inside of them, which collide with their edges as if they were outside of them... thus containing them. Perhaps I would be better describing it more along the lines of: 'if colliding with body, move freely; if not colliding with body, do not move freely'... though doing something like that would just have it drift out of the edge and thus get stuck... I would rather have it collide with the edge, and bounce back. The reason I want to do this is because I want to have a cave-like level which shifts around... it would be rather difficult especially in the manner I want to do it... to do it otherwise... that being said, it would be desirable to also ignore the edges of this 'empty space' body, that are within another 'empty space' body.
Does anyone understand what I am trying to ask for, and does anyone have a good idea on a relatively simplistic way to do this? I have an idea, but my experiance with Box2D is limited, so I am looking for someone with more experiance's suggestion.
I would like to use some bodies in an opposite fashon... I would like some bodies to have other bodies inside of them, which collide with their edges as if they were outside of them... thus containing them. Perhaps I would be better describing it more along the lines of: 'if colliding with body, move freely; if not colliding with body, do not move freely'... though doing something like that would just have it drift out of the edge and thus get stuck... I would rather have it collide with the edge, and bounce back. The reason I want to do this is because I want to have a cave-like level which shifts around... it would be rather difficult especially in the manner I want to do it... to do it otherwise... that being said, it would be desirable to also ignore the edges of this 'empty space' body, that are within another 'empty space' body.
Does anyone understand what I am trying to ask for, and does anyone have a good idea on a relatively simplistic way to do this? I have an idea, but my experiance with Box2D is limited, so I am looking for someone with more experiance's suggestion.