How To Open A (Double) Door Using Timelines | Re Usable Door Animations - Unreal Engine 4 Tutorial

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 44

  • @tomhikon
    @tomhikon 2 роки тому +1

    You've got a tut for everything, I learned alot here thank you!

  • @megtwin
    @megtwin 2 роки тому

    Perfect, as usual whatever I need I just come to your channel.

  • @bigangryskies
    @bigangryskies 4 роки тому +1

    Great stuff, keep em' coming!

    • @MattAspland
      @MattAspland  4 роки тому

      Thank you, that means a lot :D

  • @visamalog
    @visamalog 2 роки тому

    Thank you man. This worked perfectly. I had to change the values of the floats to match my doors, but apart from that everything works just fine.

  • @iampiggy2838
    @iampiggy2838 4 роки тому +3

    This was really helpful! Are you planning on making a tutorial series?

    • @MattAspland
      @MattAspland  4 роки тому

      Thank you, and I could do, a series on doors or in general, like making a game?

  • @aluckyshot
    @aluckyshot 4 роки тому +3

    My door works great for the first open and close then it seems to open and close instantly, not sure what's going on. I will fiddle with it. Your tutorials are great, thanks for the sharing.

    • @MattAspland
      @MattAspland  4 роки тому +8

      Hi, sorry to hear that! My first thought is, on your timeline, make sure you are using "Play From Start" and "Reverse From End" instead of "Play" and "Reverse". If you were using the latter this might fix your issue. Let me know how it goes

    • @poizan8460
      @poizan8460 3 роки тому +2

      @@MattAspland That was the fix, Thanks was stuck there :D

    • @GrifChan
      @GrifChan 2 роки тому

      @@MattAspland that actually worked tanks, but for some reason the delay stop's working after doing that..

    • @shimmergaming
      @shimmergaming Рік тому

      I had this issue and fixed it pretty quickly! What I did was make a boolean that turns on when the animation starts, and at the end it delays the length of the door animation then turns off. Use a branch after your gate that only sets off if your boolean is false. That keeps you from being able to interact with the door mid-animation, which seemed to be the issue for me.

  • @Skokom
    @Skokom 6 місяців тому

    thank you for tutorial!

  • @domenicobianco7671
    @domenicobianco7671 Рік тому

    Great Tutorial! What should I do if I want to open each port individually? could be very useful for furniture doors.

  • @Asmund648
    @Asmund648 4 роки тому +1

    Awezome, will try this soon. Do you have or can make a single door tutorial too?

    • @MattAspland
      @MattAspland  4 роки тому +1

      Thank you :) And I have a few single door tutorials too, not with this method though, if you don't manage to do this tutorial but with a single door then I can make a video on it if you like :)
      Door Tutorials Playlist: ua-cam.com/play/PLQN3U_-lMANNeRdjASe1vrm2WJ8X12oWP.html

    • @kenalpha3
      @kenalpha3 2 роки тому

      @@MattAspland Thanks for that link. I have a single door that I only need to slide open (into the doorframe and wall). 1) Can you direct me on how to (correct way) to SetRelativeLocation - for only X or Y?
      [I read that Set..Loc is better for animations instead of Set Transform.)
      1 EDIT): got it. 4:20 (Thanks for pointing this out), right click on the New location pin (of SetRelativeLocation), and Split structure pin. And I plugged in (from Lerp) into the Y pin.
      2) But a new problem [FIXED], when the door mesh moves, it resets its center to not align with the Frame mesh (sinks in the ground and moves in 1 axis). But in the Viewport, the meshes are lined up correctly. I have Door a child of Frame.
      2 SOLUTION): Go to viewport, click the Door mesh, see what Z value it is using = 350 (mine was raised higher to line up with the Frame mesh, which is at Z = 0).
      Go back to Event graph > Right click the Z pin (of SetRelativeLocation), and promote to variable. Compile. Then set Z = 350.
      Repeat the same step for the Closed code copy.
      Thus when triggered, the Z location stays at Z = 350 (opened or closed), and only the Y lerps between open location or closed.
      Problem 3) Also I had to put in a high value of 1000 units (for Door open variable). While in the map, it only needs to move 192 units. Maybe me scaling the frame messed up the distances? [Edit: it appears that I scaled the Frame down, while Door was a child. And this messed up the distance measurement. But 1000 units works for my scaled example.]
      ----------OLD problem:
      I thought I could figure it out, using a Break Vector after the Lerp [4:33]. And plug only the X or Y into the New Location pin (of SetRelativeLocation). But my door is sliding down into the map (Z?) and away, instead of sliding in only 1 direction.

  • @serizawareda7831
    @serizawareda7831 11 місяців тому

    i did the same with the node " Movement To " instead of Timeline but it's moving my static meshes in a weirdo way.. i don't know if its UE5 who's messing with me because when i restart it, it works and sometimes it dont...
    God i want to master blueprints... u_u i only have 2 months on it but its rly frustrating...

  • @mohammadjavadehsani346
    @mohammadjavadehsani346 4 роки тому

    You Are Awesome!

  • @artdrawing6682
    @artdrawing6682 2 роки тому

    Wow cip going and thanx for totorial

  • @crimsontyrs
    @crimsontyrs 4 роки тому

    nicely done

  • @percythomasarchitecturalvi1266
    @percythomasarchitecturalvi1266 4 роки тому

    Hi Matt - Can you show how you could trigger the door without having to press a button? Also can you show how you could change the third person character for a VRPawn?

    • @MattAspland
      @MattAspland  4 роки тому +2

      Hi, to have it open and close automatically, what you can do is go into the open of the timeline off of begin overlap, and reverse on the timeline off of end overlap. The code in between can go. Hope this helps :)
      And I can look into the latter suggestion too!

    • @percythomasarchitecturalvi1266
      @percythomasarchitecturalvi1266 4 роки тому +1

      @@MattAspland Thank you it works perfectly with VRPawn!

    • @MattAspland
      @MattAspland  4 роки тому

      @@percythomasarchitecturalvi1266 That's great, no worries!

    • @alainbernoty8478
      @alainbernoty8478 2 роки тому

      @@MattAspland Hello, could you please elaborate on the VR part, I tried following your tutorial step by step, but I cannot get it to work... Thank you!

  • @Vectorr66
    @Vectorr66 4 роки тому

    Hmmm, I am sad. The simulation seems to go up to the gate, showing I am pushing the interact button but nothing out of gate to flip flop and next part of code. Door is not opening.

    • @MattAspland
      @MattAspland  4 роки тому +1

      Hmm okay, is the simulation going up to the gate from the "Begin Overlap" too?

    • @Vectorr66
      @Vectorr66 4 роки тому +1

      @@MattAspland Yes. I thought since I didn't have an actual character is why I added two different but it even linked up before the camera actor was just added. ibb.co/w6GzvpL

    • @MattAspland
      @MattAspland  4 роки тому

      Oh okay, it might not be working because the camera probably doesn't have collision, so the box collision won't be registering anything there.

    • @defiant4eva
      @defiant4eva 3 роки тому

      @@Vectorr66 I made a mistake on this, to fix it. In Enable input, make sure your Get Player Controller is plugged into the Player controller pin, in Enable input player controller and not Target.

  • @prathameshbairagi7454
    @prathameshbairagi7454 4 роки тому

    I built a new gaming pc 😆😆 Love form India🤗

    • @MattAspland
      @MattAspland  4 роки тому

      Ah nice, it's always exciting :) What are the specs in it? And thank you :D

    • @prathameshbairagi7454
      @prathameshbairagi7454 4 роки тому

      @@MattAsplandProcesser - Ryzen 5 3400g with Vega 11 Graphics
      Ram - 8 Gb
      Motherboard - Gigabyte A320-M.2
      Cabinet - Areocool Bolt
      PSU - Corsair 450V
      That's it🥰🥰

    • @MattAspland
      @MattAspland  4 роки тому +1

      Sweet, sounds great, hope you have fun with it :)

  • @luquedev
    @luquedev 4 роки тому +2

    First

  • @defiant4eva
    @defiant4eva 3 роки тому

    Just an FYI. If you add a doorframe to your door BP, make sure it is the parent replacing the Root. Then set your trigger to a child of your doorframe. If it is set as a child to the Door static mesh, it will rotate with the door.
    Now add another static mesh as a child of the frame, add your door asset to this, also add a box collider as a child of the door, and adjust the size to your door or you will have no collision and your character can just walk through the door open or closed.
    The box collider will rotate with the door as it is a child of the door, so no need for any extra code.

    • @saivikas9580
      @saivikas9580 2 роки тому

      Hey can you please once elaborate on this a bit. I am having the issue where I cant walk through the door frame but I can walk through the door. I checked the collision was on for both the door frame and the door in the mesh settings but it still happens.

    • @defiant4eva
      @defiant4eva 2 роки тому

      @@saivikas9580 okay, firstly your character isn't able to go through the door frame, because your character collider is to large. To fix this. You need to increase the size of your door frame. UE uses a very simple capsule collider for your character, it is slightly wider than your characters torso, but slimmer than your characters shoulders. You can fi e tune it, but as default it is good enough, and you will spend hours and multiple sessions resizing it around other problems.
      Your chooses are make your door frames larger, which should help, but if you are not happy, then remove.the frame colliders and the wall colliders will be fine. But personal choice. Your level of attention to details is something you will always have to compromise, but for learning I would suggest KISS. keep it simple silly.
      As for the door, my original comment explains how to add a collider onto the door and which order to place it in, as a child of the door.
      Also for keeping things organised I would create an entire door including frame, and colliders under one actor. That way you don't have to assemble each one when you place them in the world. This greatly helps you out when your door has multiple parts and you have a level, instance or world with multiple doors. Also with multiple parts and materials Locks, handles, glass panels, etc etc.

    • @saivikas9580
      @saivikas9580 2 роки тому

      @@defiant4eva Thank you for the advice. Definitely answered my question. Do you have a youtube channel or anything simillar btw so I can learn more from you.

    • @defiant4eva
      @defiant4eva 2 роки тому

      @@saivikas9580 sorry, I don't really have the time to have a UA-cam channel, plus I am also a learner, I might just be slightly ahead of you, but you also might have other knowledge I don't possess.
      I have so eti es thought about.putting tutorials up on UA-cam, but honestly between work, learning, developing, social duties, and life. I have literally zero time, but don't worry there are hundreds of creators out there. Even there old stuff can be used to learn from, it all can be adapted, which is another skill you will learn in doing so, and it is a key skill you will need.
      Good luck with your development and learning.