After using trigger volume and compilling when i want to play it the engine crashes

Added this Code to the .h:
private:
UPROPERTY(VisibleAnywhere)
float OpenAngle = 90.0f;

 UPROPERTY(EditAnywhere)
 ATriggerVolume* PressurePlate;

 UPROPERTY(EditAnywhere)
 AActor* ActorThatOpens; //Pawn inherits from actor
and this to the .cpp:

void UOpenDoor::OpenDoor()
{
AActor* Owner = GetOwner();

 FRotator NewRotation = FRotator(0.0f, -160.0f, 0.0f);

 Owner->SetActorRotation(NewRotation);

}

// Called every frame
(line 42) void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

 // ...

 if (PressurePlate->IsOverlappingActor(ActorThatOpens))
 {
     OpenDoor();
 } 

}

Hello,
that code might cause an issue if you have a door without a pressure plate set up.

i would change the tick code to something like this :

if (PressurePlate && ActorThatOpens && PressurePlate->IsOverlappingActor(ActorThatOpens))
  {
      OpenDoor();
  } 

Thus we only check overlap is setup is complete

if it does still crash, please share the log so we can debug it better !

the engine has stopped crashing but when overlapped with trigger volume event is not triggered

because either "PressurePlate " isn’t setted up or "ActorThatOpens "

you can setup presure plate inside on the map, but for the actor variable, i don’t know what you planed.