how to "drag" doors ?

Hello,

Can someone give me a clue how to make a door system which:

on press of a mouse button you open the door and have a control of a rotation using mouse controls ?
Something like in amnesia or the recently released layers of fear.

You can use the SetPosition function of your door matinee. This controls the time the matinee animation is at in its timeline. For example if your animation is 5 seconds long and you call SetPosition 2.5, the animation will forward to the 2.5sec mark in the timeline.

With this you can simply calculate the distance the mouse has travelled in the Y-direction since pressing the button to open the door, divide the result by the matinee length to get a percentage, clamp it to 0-1 range, then use that as the timeline position.
Example:

One thing to mention is that in BP there is currently no way to get the matinee length, so you have to type in the length by yourself in the BP!

thank you very much. It worked :slight_smile:

I’d say just save it inside the door blueprint :stuck_out_tongue: The door has to know how much “opened” it is :smiley:

actually there is one problem.

If the doors are opened lets say 50% of the matinee animation , and you want to “grab” the doors again, it resets the current position to a start point. What is the best way to store the current position of the matinee for further interaction?

Can someone please help me? How can i calculate the distance of the mouse ? I dont get it…i’m thinking for days about it. Do you have picture of a complete Blueprint ?

Hello, is there someone who can help me ??

I’ll send you some blueprints screenshots tomorrow :slight_smile: