Messed up rotation when rotating from blueprint code

So I was implementing the blueprint logic Ben was explaining and my door kept snapping into another yaw rotation as soon as I started playing.
I figured that this occured due to an initial rotation of the object which Ben’s blueprint code doesn’t take into consideration. It always sets the rotation of the Object to 0,0,0 and start to increment the yaw. This works only if the initial yaw of your object is set to 0,0,0 as well. Otherwise it will “snap” into that rotation as soon as you start to play or rather “OnClose” fires.

I’ve attached a slightly modified blueprint which considers the initial rotation, which allows you to rotate the door any way you like and it still opens as expected.

take_initial_rotation_into_account

1 Like

I just realized, the very next video takes care of my issue, oh well :smiley:

1 Like

But you learned more by figuring it out yourself, and that’s a nice bonus.

Privacy & Terms