RInterp to doesnt work (SOLVED)

Hello, I’m new to Unreal Engine. I have been tinkering with blueprints and try to see what I can do, however I have a problem. My goal is to open a door using RInterp to give it a little door-opening animation. I couldn’t get it to work, the door just changes the rotation from one position to another. Here’s a screen shot of my blueprint. Hope I can get some help from the community, thanks!

Take a look at this tutorial.

You need to put a constant pulse into the rotation for the RInterp to continue to move. You will probably also need to replace the ‘time take to rotate’ with ‘get world delta seconds’. With that changed the current setup would increase the rotation based on what you have as the interp speed but only a fraction of it.

If you put a loop that goes through the rotation until the door reaches the open rotation and then cancel. That would make it work. Here is that setup.

You could also use timelines as per Keyle’s response but I find the interp way less hassle.

Here are some possible solutions for you.

  1. Method - If you insist on using RInterp To, then here’s one:

This is how it looks in the viewport. The components are:

DoorMesh (StaticMesh type): The door mesh that will be rotating. I used SM_Door (starter content I think).

DoorFrame (StaticMesh type): This is just for reference. Not really needed.

Trigger (Sphere collision type): Overlapping this volume will play rotation animation.

Copy the setup you see in the images.

Here’s what happens:

Use define a Timeline that can be used as Delta Time for RInterp. I used a simple float curve with linear interpolation with 2 keys: 1( Time: 0, Value: 0), 2( Time: 2, Value: 1)

This will play a fairly smooth animation. but you may have to play with the values to get the desired effect.

(Note that the 2 Timelines are the same, just duplicated)

There are 2 custom events that stop each other’s animations. This is needed for the animations in order not to get messed up with each other (you can try without them to see what I’m talking about).


  1. Method - I think you can achieve the same result with Lerp (Rotator) Instead of RInterp To.

(Continuation in comment)

  • Matinee

This is probably the hardest and longest one, so I’ll just include the link which you should follow to get it done this way ( Setting Up a Door | Unreal Engine Documentation ).

  1. Method - Simple animation using timeline
    This one is the easiest and fastest, so I recommend using this.

Here’s what to do:

This is all the blueprint you have to do.

This time in the timeline, though, you have to set the value to 90 (representing the degrees the door should rotate (also make it negative (-90) to have it rotate in the other direction)), and the duration of the timeline is how much time it takes for the door to reach its target rotation.

This is it. I hope everything was clear, if not, feel free to ask

Don’t take the method numbers into account, autolisting messed it all up for me, sorry for that

Also, you don’t have to use a trigger volume to play the animation, you can use any key or any other event you like, obviously

Thank you for your answer, on the first method you mentioned above, I couldn’t find any of the red nodes as well as Rotation node so can you elaborate on that a little bit more? I’m freshly new to this. Thank you. Btw the link that you included is very helpful.

Thank you for the link, it looks like it is more complicated than what I want to do, will play around with it to gain more experience.

Thank you for your reply, I set up mine somewhat similar to your picture and then I added a while loop, however I keep getting infinite loop error. Here is my set up:

My logic is that, if the current door rotation is not equal to where I want it to be, then keep rotating until they equal, then the loop stops. I tried to break rotation into component and compared the yaw of current door rotation and the yaw at where I want it to be by doing something like while(yaw_current <= yaw_wanted){loop} but no luck (the reason i use break rotator is that I cannot find a <= operation comparing the rotation, only == or !=)

I don’t know which red node you mean, so here’s both of them:

On Component Begin Overlap (Trigger): as I have mentioned above, and as you can see in the first picture (door viewport.png), the blueprint consists of 2 static meshes [Add Component->Static Mesh], 1 is SM_Door (from starter content), other is SM_DoorFrame (but it’s not necessary to include, as only the door will rotate), and the last one is a sphere trigger volume [Add Component->Sphere Collision], which is named “Trigger”.

In the Graph Editor, with the “Trigger” selected, [right click->add event to Trigger->collision->on component begin overlap/end overlap] (it may differ in a word or two).

I used them to play the animation, but of course you can play them for example if you press the X button or something, so that is just arbitrary (if you use a button press to open and close the door, you don’t need to add a sphere collision component).

The other red nodes are “Stop Animation” and “Stop Animation Copy”. I created them by clicking [right click->add custom event], and named it “Stop Animation”, then duplicated it, so it was automatically named “Stop Animation Copy”.

Right above them you can see them being called. You can do that by dragging off an execution pin (white arrow-like pin) and searching for [call function-> stop animation] or something similar (you can only find two options, 1 - add event->stop animation; 2 - call function-> stop animation).

Here is a links for more information on this:

The rotation node you see is a timeline. To create it, you have to [right click->add timeline]. You can also name your timeline, so I named mine “Rotation”. Then double-click the timeline node you created, then click the “Add float track” button.

See Timelines | Unreal Engine Documentation for more information

Because you have a while loop and delay with the manual loop is what is causing the infinite loop.
Now that I understand exactly what you are trying to achieve, a timeline is the way to go. Like tendos reply below.
Here are a few screenshots. Also if this is in another blueprint other than the player character then you will need to enable input so the blueprint is allowed to use the key X.

88713-enable+input.png

Inside the timeline is a simple float track from 0 to 90 over 2 seconds with auto smoothing.

Thank you for your help, I’ve got it working the way I want!

Thank you for your clear and helpful explanation, I was able to achieve what I wanted. Thanks again!!

Can you please show me how did you solve it?? I’m facing the same issue

Unfortunately the movement of the wiki stuff has totally broken ALL of these old links.