Thought I’d do some extra work to make sure it can open no matter which direction it’s facing as long as the door is vertical / upright. I could do the extra work to figure out if the door is upright so that we could adjust the door further, but that would take a bit more math than what can be accomplished in 30 minutes, so I’m going to stay focused on the course instead.
Super::BeginPlay();
float MyFloat = 90.f;
// By still Getting this, we can make the door open relative to it's current position, instead of as an absolute rotation to the game
FRotator CurrentRotation = GetOwner()->GetActorRotation();
FRotator OpenDoor = {
CurrentRotation.Pitch,
CurrentRotation.Yaw + MyFloat,
CurrentRotation.Roll
};
GetOwner()->SetActorRotation(OpenDoor);
!