Just following a tutorial on volume triggers, the game started crashing when I press play I narrowed it down to this if
statement in OpenDoor.cpp:
void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
// Poll Door every frame, if actor enters trigger volume OpenDoor()
if (PressurePlate->IsOverlappingActor(ActorThatOpens))
//THIS IF IS CAUSING THE CRASH[link text][1]
{
OpenDoor();
}
}
OpenDoor.h for reference:
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UOpenDoor();
UPROPERTY(EditAnywhere)
class ATriggerVolume *PressurePlate;
UPROPERTY(EditAnywhere)
class AACtor *ActorThatOpens;
protected:
// Called when the game starts
virtual void BeginPlay() override;
void OpenDoor();
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
};