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.
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?
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.
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.
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.