How To Hide Under A Bed - Unreal Engine 4 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ต.ค. 2024

ความคิดเห็น • 79

  • @MattAspland
    @MattAspland  3 ปีที่แล้ว +6

    Hey guys, so a quick fix for this. If you keep moving your mouse the yaw and pitch values will keep increasing or decreasing, meaning you have to move your mouse a lot to move it back. How we will fix this is by setting the variables again after the clamp with the return value of the clamps. That way, the clamp is limiting the value going into the variable as well as the value coming out of it. Hope that makes sense, and I'll leave some images linked below for you to see the fix!
    imgur.com/a/2mn40QM

    • @mineproxima
      @mineproxima 3 ปีที่แล้ว +4

      the screen is shaking too much

    • @jacksonholtmusic
      @jacksonholtmusic 3 ปีที่แล้ว +1

      @@mineproxima same

    • @Peacemotiv
      @Peacemotiv 3 ปีที่แล้ว +1

      @@mineproxima yep

    • @austinballard9009
      @austinballard9009 ปีที่แล้ว +2

      Ok so i know its like a year later. But i fixed the camera shacking. all you have to do is move the multiply by -1 in front of the new set pitch node after the clamp node. Since the multiply node is inverting the pitch movement setting the pitch after the multiply is forcing the value back down -1 every time you move up or down and setting it back to 0. Hope this makes sense and hopefully this tutorial gets an update in UE5.

    • @anthonyibrahim
      @anthonyibrahim ปีที่แล้ว +2

      ​@@austinballard9009 Thank you you saved me

  • @SanneBerkhuizen
    @SanneBerkhuizen 3 ปีที่แล้ว +10

    OMG.
    This can be applied to so many objects.
    You could sit at a table,
    Look at security camera,
    Lay in bed,
    With just this code and different static mesh and camera position.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      Exactly! You've got the right idea, it's amazing how versatile code can be!

  • @MattAspland
    @MattAspland  3 ปีที่แล้ว +2

    Hey guys, I've also just made a video on how to hide in a locker, so if you want to do that, check out this video below! All the best :)
    th-cam.com/video/gHJ4pHlqAzQ/w-d-xo.html

  • @axilyk
    @axilyk 3 ปีที่แล้ว +4

    This video was helpful, I really want a leveling up system tutorial

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Thanks man, and great idea! I can definitely look into that :)

  • @SanneBerkhuizen
    @SanneBerkhuizen 3 ปีที่แล้ว +5

    My thoughts as i see the video pop-up.
    YES I love hiding under my bed these days!

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      Haha great! It's very fun to do sometimes! :)

  • @stevenwynn819
    @stevenwynn819 3 ปีที่แล้ว +1

    A great addition to your horror series!

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Thanks Steve! Glad you think so :)

  • @Noctis19951
    @Noctis19951 3 ปีที่แล้ว +2

    In the camera inputs, it is constantly adding up. You have to put a limiter so that when he reached the limit of the angle, he set the limit. For example, if Yaw's min is less than 20, Yaw is equal to 20. This is a practical way I found, I don't know if there is a better one.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Hi, this is what the clamp that we used is doing. It is capping the values at our minimum and maximum values we set, that way we don't need to manually set it up or write more code for it. Unless you are referring to something different?

    • @Noctis19951
      @Noctis19951 3 ปีที่แล้ว +1

      Using the clamp you only limit what you get but the value is still adding up. If you force yourself to look beyond the limit you have to compensate by looking the other way, so you get a delay in the camera movement.
      But the most practical way to put an if is to set the values ​​of "Yaw" and Pitch "with the value of the clamp, that there it will really be among those values.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      ​@@Noctis19951 Yeah you're right, I realise this is happening because we are setting the variable BEFORE the clamp, that is why the clamp isn't limiting it. However, if we set these variables again AFTER the clamp, then that way the clamp will effect this as well and limit it to the values we want, therefore removing the need to move your mouse a lot more to get back.
      Thank you for making me aware of this. I believe the fix I came up with is also what you suggested now that I read it again :)
      Like this: imgur.com/a/2mn40QM

  • @SanjeevKumar-nq3zc
    @SanjeevKumar-nq3zc 3 ปีที่แล้ว +4

    Love from india keep it up

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      Thank you so much! :)

  • @azngf
    @azngf 2 ปีที่แล้ว +1

    Out of curiosity, is this the same technique as your locker video (great video btw, did it yesterday) or is this different?

  • @eddielonestar7962
    @eddielonestar7962 7 หลายเดือนก่อน

    Another excellent tutorial Matt. Thanks for sharing. I followed this and tried to implement it. All worked except my camera view when pressing H, always looks in the wrong direction, no matter how I position the camera. I swing the camera that's under the bed a full 180 and it's still facing the wrong direction. Any advice please? Is there any connection with the main Player Camera? I even updated my BP with your nodes in the description.

  • @judgejames830
    @judgejames830 9 หลายเดือนก่อน +2

    can't do this with Enhanced Input Actions?...no Axis values to select on IA_Move or IA_Look

  • @SHA4OW_Skeleton
    @SHA4OW_Skeleton 4 หลายเดือนก่อน

    hey bro its quite helpful , i ran into one issue that ai is still able to see or something dk , so the ai just stand there and tries to hit in air

  • @GreenStreamDev
    @GreenStreamDev ปีที่แล้ว

    Excellent Tutorial!

  • @The_Twisted_Monk
    @The_Twisted_Monk 3 ปีที่แล้ว

    This is still one of the best places to hide, in games. Not in real life though. xD Great tutorial Matt look forward to the next one. Just keep doing what you're doing, you're my Dude.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Absolutely xD Thank you Russel, I really appreciate your support! :)

  • @archiestutorials8716
    @archiestutorials8716 3 ปีที่แล้ว

    Wow amazing for my game thanks Matt!

  • @JustZiReacts
    @JustZiReacts 3 ปีที่แล้ว

    Great work man.❤

  • @frekito-elmidas7522
    @frekito-elmidas7522 10 หลายเดือนก่อน +1

    Hi Matt, I've done everything you said 2 times and it doesn't work when I rotating the camera, I don't know if it's because I'm doing it 2 years later and I'm doing it with version 5.3.2

  • @b4ew
    @b4ew 3 ปีที่แล้ว +1

    your tutorials are insane!
    but can you show us how to show fps in game?:>

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +3

      Thank you so much man!
      And great suggestion, I can definitely add that to my list :)

  • @krzychul_7968
    @krzychul_7968 3 ปีที่แล้ว +1

    Awesome

  • @aliahmedgaming6083
    @aliahmedgaming6083 3 ปีที่แล้ว +1

    Thank you very much ❤️

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      No problem man, hope it helps :)

  • @developernoob3546
    @developernoob3546 3 ปีที่แล้ว +1

    👏🏻👏🏻👏🏻

  • @brianlafontaine3111
    @brianlafontaine3111 ปีที่แล้ว

    Hey Matt I have a question regarding the hiding. I have the feature fully functional but the flashlight that my character picks up isn't disappearing. It kinda just floats in place till you leave the hiding spot and I haven't been able to get it to disappear as well. Any thoughts of how I can have this done?

  • @syphon5961
    @syphon5961 2 ปีที่แล้ว +2

    Is there any way to make it so that the player can't spam getting in and out of the bed so quickly? I realized that if you press H repeatedly he goes in and out really fast. How can I prevent that?

    • @imanjimoh1538
      @imanjimoh1538 2 ปีที่แล้ว

      do once node and you have moved into locker, connect the end to reset pin

  • @KingofGod2
    @KingofGod2 3 ปีที่แล้ว

    Thank you sir

  • @ManlyTube
    @ManlyTube 2 ปีที่แล้ว +1

    I kinda want to make it to where he only hides when you look at it. But I don’t know how to do that

  • @mackdiamond5805
    @mackdiamond5805 2 หลายเดือนก่อน

    what if i have multiple cameras on the bed (one for sleeping/ one for hiding?)

  • @TWGReal
    @TWGReal 3 ปีที่แล้ว +1

    if i move my Mouse to left or right then i cant move only when the mouse comes back i mean.
    Its like i go out of the PC with the Mouse Cursor and then when i come to the same time. When i want to look to the left site and then to the right site then it needs a little bit long to go to the right site. How do i fix this?

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Hey, yeah this is something I have now fixed. What we need to do is again set the variables after the clamp with the return value of the clamp, that way the variable won't keep increasing or decreasing past the value we want. I'll leave an image below of what I mean :)
      imgur.com/a/2mn40QM

    • @TWGReal
      @TWGReal 3 ปีที่แล้ว +1

      @@MattAspland oh but then a new problem happens if i want to look up or down then it shakes really weird and i cant look up or down only right or left.
      I'm sorry

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      @@TWGReal No worries, no need to apologise. Did you make sure to set the pitch variable in the right place AND the yaw variable, not just one? And then also make sure it is still all connected, exactly like in my screenshots.

    • @TWGReal
      @TWGReal 3 ปีที่แล้ว +1

      @@MattAspland yes i did everything like in the screenshots but when i look up or down it shakes fast if i look up and down again it shakes more

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      @@TWGReal Oh right okay, can you send screenshots of your code over? It sounds like it is forcing it back into place, but it shouldn't be. If I could take a closer look I may be able to spot the issue.

  • @Gta-sd7fv
    @Gta-sd7fv 3 ปีที่แล้ว

    THX

  • @ThePoePoee
    @ThePoePoee 2 ปีที่แล้ว

    How can I go from a side scroller pov to under the bed pov back to the sidescroller pov

  • @everyday_migrants
    @everyday_migrants 11 หลายเดือนก่อน

    Thanks for the tutorial, but I'm on Unreal Engine 5 and it's not working for me, the code is simple enough but I can't figure it out.... After interacting with the bed I can't rotate the camera, it just freezes in one position.

    • @everyday_migrants
      @everyday_migrants 11 หลายเดือนก่อน

      UPD: The problem disappeared of its own accord, I guess. After i launched ue the next day. I love unreal engine, thank you.

  • @Mrkev217
    @Mrkev217 3 ปีที่แล้ว

    awesome

  • @pxndoraaa4121
    @pxndoraaa4121 9 หลายเดือนก่อน

    drink a shot of vofka every time he says ''like so''

  • @dasypher9885
    @dasypher9885 3 ปีที่แล้ว

    This is sooo cool, but i am having a problem where my camera looks the wrong direction

    • @firstgamerable
      @firstgamerable 3 ปีที่แล้ว

      I am having the same issue, did you got it fixed by any chance?

    • @dasypher9885
      @dasypher9885 3 ปีที่แล้ว

      @@firstgamerable I really wish I did, but still got the same problem, sorry

    • @ciarangaming7563
      @ciarangaming7563 2 ปีที่แล้ว

      @@dasypher9885 if u still have problem turn the clamp (float) min val down or up the one that was at 60

  • @mr.generalx
    @mr.generalx 3 ปีที่แล้ว +1

    How to make a Enemy Hear while you drop item

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      Hey, I can look into doing that as well

  • @alexjr977
    @alexjr977 3 ปีที่แล้ว +2

    How u know what i need ?
    Today i am gonna make a horror game like granny

    • @mr.generalx
      @mr.generalx 3 ปีที่แล้ว +1

      Me too

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      That's great, so happy to help! Good luck with it all :)

  • @elijahgames192
    @elijahgames192 3 ปีที่แล้ว

    no matter what i do/try it won't turn the gosh darn camera.

  • @mr.generalx
    @mr.generalx 3 ปีที่แล้ว +1

    How to Hide Under the bed mobile Edition

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +3

      Hey, this should still work on mobile, you would just need to use a different event. I.e not the "H" keyboard event, but a touch event. Hope that makes sense and helps :)

  • @MicroMan264
    @MicroMan264 2 ปีที่แล้ว

    i have an extension that shows me youtube dislikes after the update and it makes me happy to say that this video has exactly 0 dislikes as of the time i'm commenting this!

  • @MartKart8
    @MartKart8 2 ปีที่แล้ว

    Five nights at Freddy's

  • @JDKDKDLDKDKDKDKKKDERYY
    @JDKDKDLDKDKDKDKKKDERYY 3 ปีที่แล้ว +1

    Always wondered how to hide under a bed, mine was always too low...