Using Trigger Volumes: Crash on Build

Running Version 4.14.1 of Unreal.

Unreal crashes immediately upon build completion when i build the code with the lines:
if (PressurePlate->IsOverlappingActor(ActorThatOpens))
{
OpenDoor();
}

Commenting these lines out, or surrounding them with “if (PressurePlate)…” or “if (ActorThatOpens)…” solves the problem but the code doesn’t work. I have only a single door and quadruple checked that the PressurePlate field was set to Trigger Volume before building. I then reverted the project to a previous version and did all this from scratch, and nothing has changed.

Are sure you don’t have any other object that has an opendoor component attatched to it?

Clicking through the world outliner the only object i can find with OpenDoor is the door (and the Pressure plate is still set to TriggerVolume).

Oh, are you using Owner anywhere? Because you assign it in the constructor rather than the BeginPlay function which is the earliest you’d be able to do that. The object won’t exist in the world at construction so Owner would be nullptr

Edit: disregard that, I read that function name incorrectly.

Wait. You have your function definitions mixed up.
You’re calling the open door code in the constructor. You want to call that in the tick function iirc

oo, whoops. That’s a bit of a silly mistake. thanks for your help.

I was having this issue as well, and fixed it with @DanM’s advice of not having the OpenDoor component attached to multiple objects in my scene. I added the component to a door object, then cloned it a few times to build up several rooms. Had to remove all but one of the components from the doors to actually be able to play my scene. Thanks!

Privacy & Terms