Problem with door system when colliding with player

Hello, I have the idea to create a door interaction system in Blender, in which, when the door opens towards the player, the door sticks its collision to the player (like a TPS camera collision), in order to prevent clipping or avoid the object to push / throw the player away.
That is, the door opens only in one direction. when the player activates the door from the front, it opens normally. when the player activates the door from behind, it opens, but the player must move away to open it completely. soon after, closing after the player leaves the collision area that opens the door.

I really need help with this system by logic bricks.
I’m using Blender 2.79.7 (UPBGE v0.2.5)

Google Translated, sorry for English errors.

Animate collision area to cover the player position or make it bigger. Close door after amount of time. If it doesnt help send blend-file.

one way is to use collision groups, put the masking of the door on an other layer, this prevents collision with the player, so the door will just open trough the player without pushing, then instead of using a collision sensor you can use a simple raycast (when pressing a key to open the door for example) to let the door play it’s animation.

1 Like

Hi @Filip_Hichel, i did a simple setup with an FPS character and a door. it is not functional, just so you can show me how the system works. Thanks for the answer.

Link: https://drive.google.com/file/d/19fnSkrgwXeJckXdCtk0wuU-GHRw4OFp1/view
Blender 2.79.7 (UPBGE v0.2.5)

Hi @Cotaks, so, my idea was to enter the door interaction area and interact with a key, making the door rotate to a limit. the problem is that the door only opens in one direction, that is, when the player opens the door (with the rotation towards the player) there is a way that the door does not go through or throw the player away. the door will open completely if the player does not hinder the flow of the object.
as if you hear a force on the door, forcing it to open up to a limit (until the object locks), and then, doing the same function when closing.

if you can show a system that looks and works with multiple doors, please show me in the .blend that i sent through the link in my previous post. Thanks for listening.

here is a demo blend that somewhat does what you want.
door-action.blend (548.6 KB)

w = forward
s = back

1 Like

Please do ignore my reply, it’s not gonna work at all, i’m sorry, I’m under heavy medication and it shows here. A door of course can’t be set to no collision else the player can simply walk trough.

Sorry for wasting your time.

it can work if you have a invisible collider in the door opening that you remove when the door opens and set it back when the door closes.

1 Like

Yes that will work just fine. But atm can’t think straight so i pulling myself out of the topic until i’m cured.

That’s exactly what I’m looking for, thank you very much.
Now it remains to understand how the logic of states and actions with properties works. (seems very confusing to me)

It’s ok man, you’re just trying to help, thank you so much for that.

1 Like

I made it! Thank you so much @edderkop

DoorSetup-Fixed.blend
Red Box - Player collision + “E” key (opens the door)
Green Box - Prevents the door from pushing the player (pauses the animation)
Blue Box - Distance for the door to remain open