How do I have different open angles for different doors through BP?

In my room I have a double door and I want the to have different open angles. BP seems to set the same one for both of the doors. How do I do that?

Make sure the open angle variable is public (the eye button should be “open” and its “details” shows “Instance Editable” checked) and then you can edit it for each door instance in the Details panel (by default to the right of the Viewport) when you select the door.

You mean the OpenAngle variable in our OpenDoor.h file which we made editable anywhere with the UPROPERTY macro?

I would like to know this as well.

In the OpenDoor.h file, where it reads something like this:

UPROPERTY(EditAnywhere)
float OpenAngle;

Add the “BluePrintReadWrite” tag, as below:

UPROPERTY(EditAnywhere, BluePrintReadWrite)
float OpenAngle;

You will also have to make the property public, instead of private.

Now, go to the Event Graph tab in the Blueprint Editor. Drag the Open Door component from the Components tab to the Event Graph tab. Create a new wire from the node that appears, and start typing “Open Angle”. Select the getter that appears, and use the value to do something similar to what you did in C++ before.

Privacy & Terms