0
$\begingroup$

I’m trying to make a simple psychological horror game at BGE, but I found a problem that I couldn’t find a solution anywhere i.e. interaction with doors. It may seem simple, but a system that comes to mind is a door that only opens in one direction (as in most houses), that is, there are differences when interacting with the same door on two sides (the side that pushes and the pulling side). However, when I try to do this by animating the door, the side that the player is supposed to pull the door on, the object ends up going through the character or pushing the player away. The solution I found, would be for the door to pause its animation of opening when it collides towards the player, causing the player to move away from the door so that it opens fully, giving way to the character. Avoiding clipping or collision bug. However, I can’t seem to find a way to do that.

I would be more thanked if anyone can help me with this problem via logic bricks. I’m using UPBGE v0.2.5 (Blender 2.79.7) to build the game. However I will provide a .blend with a simple FPS setup character and a door on the wall, for anyone who can build, I would be very grateful. Thanks for your presence.

blend file

$\endgroup$
1
  • $\begingroup$ Perhaps a simple way would be to pause the door animation when colliding with the player. but I’m still researching and I’m not finding anything related. $\endgroup$ Commented Aug 21, 2020 at 4:46

1 Answer 1

0
$\begingroup$

I made it!

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

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .