Door disappears on play

Has anyone ran into the issue where the door disappears as soon as they hit play? The door is not open/closed but legitimately just disappears. I also did updated the engine this morning. Code compiles in Unreal without any errors shown and I do not have any issues popping up in the output log either.

Any chance you did SetActorLocation as opposed to Rotation?

Sorry for the late reply, I still can’t figure it out and to answer your question, I did not SetActorLocation.

Do you have your project hosted anywhere like GitHub?

Finally got it hosted, you can check it out below:

Thanks again for your time and help!

You have rotated the door in your scene and your code is using absolute values on CloseDoor() (which is called every tick if (GetWorld()->GetTimeSeconds() - LastDoorOpenTime > DoorCloseDelay), so the start of the game).

So your door effectively does this

So I have the same problem. I see what you are saying… kinda of… but have no idea what to change to fix it. Is it the code or the scene information? I am set to relative in the Unreal Scene and it still opens 180 degrees. I even tried to make it stay by changing the starting rotation point.

I caught and fixed it. I replied to another topic about what I did but since I asked for help here I will put the fix in here as well. The problem is that we are basically declaring a starting position of 0.0, according to the code. I went to the header file and added a UPROPERTY for Close Door. Like his -

UPROPERTY(EditAnywhere)
float CloseAngle = 180.0f;

This is the angle my doors are at so I fixed it this way. Now doing it like this would mean I would need more, or should we say different, versions of OpenDoor.h if we had different doors that faced different ways. But this would actually be the case anyway based on the open angle.

Privacy & Terms