Rotating door according to mouse movement?

I’m attempting to make a “peeking” door system similar to Amnesia where you click on a door and then drag it open/closed with the mouse. I’ve already achieved the following:

  • Only select a door if the player is close enough and the left mouse
    button is HELD DOWN

  • Disabling camera movement when a door
    is selected

  • Figuring out exactly what door the
    player is interacting with and saving
    it as the actor variable
    “Object_Name”

Right now I’m stuck on actually moving the door with the mouse once it’s grabbed.

I attached what I have for the door movement. Right now it just rotates the door 45 degrees when I click on it. However, I want the rotation to be decided on the mouse movement. I also want there to be a minimum/max rotation for the door, so it only opens and closes one way and doesn’t clip through walls.

Any help?

P.S. The blueprint starts off from an event tick further down. It first compares the distance between the player and the object being selected to make sure it’s not too far away. If it’s not to far away, then it changes the door’s rotation.

If you want something more closer to Amnesia I think you should do it with physics constrains here is two videos that should help.

How to make physical door: UE4 - Tutorial - Axis Restraints (Request!) - YouTube

How to add constrains between actors(of course you need to do it through blueprint): UE4 - Tutorial - Physics Constraint Actors - YouTube

I think you could try to add a lerp node and connect the mouse input to the alpha. You could choose in A/B the maximum/minimum value so you will always be in these values.