# Are one sided collisions possible?

Hi, I wonder if it’s possible to have one sided collisions in bullet/minie?
As in, let’s say you get jammed inside of a mesh collision shape, and you can’t get out because the collisions are two sided and won’t let you phase out of there.
I tried to look through the docs but couldn’t find anything.

EDIT: Example Are one sided collisions possible? - #5 by Pixelapp

1 Like

Avoid large objects in physics. I would suggest tackling the root cause instead of creating a patch work solution.

That is not the problem

I think youre suggesting quite an unusual solution to a fairly standard problem. Which is what is making people want to dig into other potential issues (or use case). What do your two geometries (that are getting stuck together) look like? Do you have screenshots

Are you creating platforms like Smash Brothers where you can stand on top of them? But pass through them when coming from the opposite side of the face? What specific example use case are you trying to solve?

See at: 1m 50sec

1 Like

At least in battlefield 2 i know that is was done this way. You had to glitch into a house, but you could move outside again without issues. So the collision checks have been from the outside only. Afaik in the very first platformer i wrote 25 years ago i also allowed for already colliding objects to uncollide.

1 Like

Yes, this is it. (I mean I’m not creating platforms like smash bros but this is the kind of one sided phasing I was talking about)

I’ve never tried to implement unidirectional collisions in Minie.

I imagine you could write a custom collision-group listener (for characters) that filters out overlaps when the character is moving in a particular direction.

1 Like

You should provide examples of what you are trying to achieve, so people can help you with work-arounds.

I highly doubt a free (open source) 3D collision library is going to have such niche use case as a one sided collision detection.

Do you mean “one sided” as only one side of a face collides? Like a character fully inside a cube can walk out of the cube but otherwise cannot walk back into it?

Or do you mean that sometimes you want only one object of the pair of objects to collide?

I agree with others that details about your actual use-case are probably useful for further discussion.

Yes, this is what I mean. I’m sorry for not providing any specific use cases, as it’s not really any specific game feature that I want (like the smash bros platforms), it’s just that due to the nature of the game, the player character may sometimes end up clipping into other physics objects (for example: different static collidable props can be placed by players).

I understand that it’s something that I have to fix on my own end (ie better player detection when placing those, or moving the player out via some custom detection system), but I’m not sure to which extent and how reliably I can alleviate the issue, and having these one-sided collisions would help a lot, as the players would be able to just walk out of an object in case they ended up inside of it, instead of being jammed/pushed into it in the worst case scenario (especially if its a relatively thin object).

(Note: yes I do use built-in PhysicsCharacter for the player, not the BetterCharacterControl one)

One option to get you over the issue now and allow it to be improved incrementally later is to provide some kind of “get out of trouble” option for when the player is stuck.

Some key they can hit or whatever the detects that they are colliding with something and then force separates them from it through warping or whatever.

1 Like