The door must open (Building_Escape)

// copyright bla

#include “Opendoor.h”

// Sets default values for this component’s properties

UOpendoor::UOpendoor()

{

// Set this component to be initialized when the game starts, and to be ticked every frame.  You can turn these features

// off to improve performance if you don't need them.

PrimaryComponentTick.bCanEverTick = true;

// ...

}

// Called when the game starts

void UOpendoor::BeginPlay()

{

Super::BeginPlay();

FRotator CurrentRotation = GetOwner()->GetActorRotation();

CurrentRotation.Yaw = 90.f;

  

GetOwner()->SetActorRotation(CurrentRotation);  

}

// Called every frame

void UOpendoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)

{

Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

// ...

}

Please use a code block in the future by highlighting the text and using the </> button.

This should be += not =

thanks

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms