Physics driven door system blueprint problem, any help?

it can never go beyond on the example cause there is physics constraints already applied.

You can control closing like this, here is a simple door logic still physics involved as when door is unlocked.

OnOverlap->Pawn->CloseDoorFunction->Lerp 0-1 Timeline → LerpRotator-> From CurrentRot to Zero (Default Start Pos) This will always choose the shortest path if you check the tick.

You can set door state to false from function which will,
SetDoorState(False)->Sim Physics Off → Close Function->If need closing-> CloseFunction

You can extend it more logic to make sure its closed, an event can occur when door is closed and locked so you will be sure that the function callback is valid.

Still there is a physics constraint applied to it since in level design you don’t want you door to hit objects etc. (or maybe you want)

This is the results for just closing it, that will never fail. (in terms of problem space you defined so far)

Result

Notice physics is disabled when we interfere movement and status of the door, since in that moment of gameplay many things can happen to prevent door from closing. Like putting a heavy object in between, player drops some of the shields collected to there. As said you will define the need and keep in mind this is just a prototype raw and you will need events on door squences finished so that lerp events do not interfere the state.

Edit: Changed lock bool since it was wrong logic before

1 Like