Having doors on different angles (Lecture 88)

Just thought I’d give my variation on the solution as what was done in the video didn’t work for me “straight out of the box” so to speak.
Unlike the video where we have 2 doors facing the same way on the same wall, I had 2 doors facing different directions on adjacent walls. This caused problems earlier in the course where, when the pressure pad was activated, both doors would open to the same angle regardless of their initial starting rotation (90 degrees from one another).
I managed to remedy this (with help from our peers at Udemy.com, thanks again). https://www.udemy.com/unrealcourse/learn/v4/questions/1493342

However, because of the changes we made in this video I found myself back to square one, so I thought I’d share my fix in case others experience the same issues.
In the Construction Script of Openable_Door_BP we need to create a variable that holds the initial rotation of our door as it is placed in our world. We do this by dragging out SetActorRotation, then dragging back from New Rotation GetActorRotation. From GetActorRotation’s Return Value drag out and “Promote to variable” (I renamed this to Initial_Rotation). Connect this setter to SetActorRotation.
This provides us with a variable we can now use in our event graph.

Next, in our Event Graph we drag in our Initial_Rotation as a getter, drag out CombineRotators and add a value to our z axis, then connect this up to our SetActorRotation as the New Rotation.

The end.

1 Like

Hello I want to reach the same result. I try it but it’s not work. Can you help me?

So sorry I didn’t get back to you. I hope you worked it out.
I’m just getting back to this course after doing other things for 2 years. :wink:

You, sir, saved me a big headache. :+1:

1 Like

Privacy & Terms