Ledge Grabbing Tutorial Unreal Engine Blueprint

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 มิ.ย. 2023
  • Ledges!! for a surprising amount of genre's you'll likely have to do SOMETHING with them for how your character interacts with them. Today we're taking a look at one of the simpler but useful things you can do, that being grabbing onto them!
    Get the project files here : / unreal-engine-84366058
    Join the discord for any help you need! : / discord
    support the channel and development over on patreon : / thegamingcaves
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @mileman5072
    @mileman5072 8 หลายเดือนก่อน +1

    Great tutorial mate! I love how you explain what you are doing and why!

    • @thegamedevcave
      @thegamedevcave  8 หลายเดือนก่อน +2

      Thank you! Cheers!

  • @user-gn8gr2qm4o
    @user-gn8gr2qm4o 2 หลายเดือนก่อน

    This is a good tuto video. Other videos from other TH-camrs just speed through without explaining in detail, leaving us begginers confused.

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

    Thanks for the video, really helpful start

  • @Tramicful
    @Tramicful 3 หลายเดือนก่อน +1

    Great tutorial, thanks a lot, love your way of explaining things, always great to mention shortcuts too.

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

      You're very welcome!

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

    Super Helpful 👍👍

  • @PANDA-wz8fz
    @PANDA-wz8fz 2 หลายเดือนก่อน +2

    bruh there are 20 different get velocity and u make a cut scene so noe one know what you picked

  • @RealVergilSparda
    @RealVergilSparda 5 หลายเดือนก่อน

    i just dont understand why the line trace seems to happen multiple times for me, also my character teleports on top of the object instead of infront of it, also is it possile to make this not require falling down? i dont want that for my game so

  • @dafe1115
    @dafe1115 9 หลายเดือนก่อน +1

    Been trying to do the same method for a 2d game. It seems to just rotate the character and makes them fall

  • @cheerswilliam1973
    @cheerswilliam1973 11 หลายเดือนก่อน +3

    Hi, this is a really helpful start. One problem with the ledge grab is that it will ledge grab both ledges and walls; you can grab onto a tall wall and continue hopping up it, which is not desired. I created 2 more line traces, one parallel to the second line trace with the z value +50, this one checks if there is more wall per say above the impact point. If there is more wall, there is no more tracing, if there isn't, do a final line trace, one parallel to the one we just made but with the z value - 40. This trace checks to see if we are too far above the ledge for it to be considered reasonable to hook onto. If this check also passes, _then_ we do the impact trace you made last.
    So my system goes: your first line trace, my 2 line traces, and your last line trace.
    - First line trace: 1st trace in video
    - Second line trace StartVec = (x val of Actor Location, y val of Actor Location, [z value of 1st line trace's Out Hit Location] + 50)
    - Second line trace EndVec = (x val of [Actor Location + {Actor Forward Vector * 50}], y val of [Actor Location + {Actor Forward Vector * 50}], [z value of 1st line trace's Out Hit Location] + 50)
    - Third line trace Vec values = same calculations but instead of +50 just do +10
    - IF Second Line trace is false (if there is no more wall above our impact point) AND IF Third Line trace is true (if we are not too far above the ledge), THEN do the fourth line trace
    - Fourth line trace: 2nd trace in video

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

      that is why, at the end of the video I make a custom trace channel, and only do my line tracers on that channel, by default all actors are set to ignore that channel but you can then , in any blueprint, or even on an individual actor in a level, enable that collision to block the custom channel and allow the player to grab onto it. that saves the 2 extra line tracers and also introduces less chances for edge cases where things may get buggy, as you have very exact control over what the player can even grab onto in the first place.

    • @cheerswilliam1973
      @cheerswilliam1973 11 หลายเดือนก่อน +2

      @@thegamedevcave Ah I saw that part of the video! But let's say you have a wall that is a part of that custom collision channel, so you can ledge grab onto it. Even with the custom collision channel, if the player does a small jump and hits the wall, the ledge grab will activate whether we are on the wall or the ledge of the wall. If I want to make a game with wall jumping as well as ledge grabs, or just have a tall object that is part of that collision channel, that would be the problem we'd run into.

    • @thegamedevcave
      @thegamedevcave  11 หลายเดือนก่อน +2

      @@cheerswilliam1973 of course, if you have a very common situation in your game where you'll want the exact same mesh to work as both a wall, and a ledge, hard coding in those extra tracers might work best. Still, i'd probably more likely add some colliders to the top of the wall that are visible to the custom channel but both methods work fine for different purposes

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

      @@thegamedevcave that makes sense! looking forward to more ue5 tutorials from you; underrated and very helpful in creating game systems.

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

      I had same issue, I figured out a way to solve it, in my case it is a 3D platformer, so I want wall sliding, but I think would be the same if you do not need it.
      I added a capsule trace above player´s head pointing forward before all this other ones, if it hits then branch is true and would mean that the player is lower than the ledge and will actually hit the wall so wall sliding logic happens. If doesnt hit then the other logic runs and will grab the ledge.
      In case you do not need wall sliding, you could say, if trace hits then nothign happens, keep falling.
      I hope it helps for you or others with same issue that need to solve.

  • @bakmau8330
    @bakmau8330 3 หลายเดือนก่อน

    This is a great tutorial! I set this to automatically play a mantle montage instead of having to wait for a second input which I prefer. I have an issue where the line trace is in world space not local space. Its most noticable when you increase the cast distance to 150, any idea to be sure its local to the character's current facing and not the world?

    • @bakmau8330
      @bakmau8330 3 หลายเดือนก่อน

      ah nm I found that if set off the capsule forward it works better

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

    I love it, comment for the algorithm!

  • @ericdrob
    @ericdrob 6 หลายเดือนก่อน

    Yer a saint!

  • @user-gn8gr2qm4o
    @user-gn8gr2qm4o 2 หลายเดือนก่อน

    Is it possible to make character grab while jumping up too and not use tick event ?

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

      you can do it on a timer instead, checking X times per second instead but this is the kind of thing you really want to be doing every frame honestly

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

    Hi! im having an issue that have been unable to solve. Everytime i jump to a wall (a collision being registered) my character gets teleported to the left corner behind this same starting map u are using here. I did it all exactly as the video says, thanks in advance.

    • @thegamedevcave
      @thegamedevcave  4 หลายเดือนก่อน +1

      sounds like your character is getting teleported to location 0,0,0 . check Set actor Location node to make sure that the location is connected properly

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

      @@thegamedevcave Oh Thanks! ill check that as soon as i can

  • @alonshamash9343
    @alonshamash9343 29 วันที่ผ่านมา

    If you are talking about falling that you explained in previous video you should link to it.
    Going through your tutorial and got stuck because can seems to find what video you explained that part....

    • @thegamedevcave
      @thegamedevcave  29 วันที่ผ่านมา

      i dont think this video should rely on any previous video's ive made? what part are you getting stuck on?

    • @daddystewart
      @daddystewart 23 วันที่ผ่านมา

      @@thegamedevcave The state machine/event graph portion at 12:53

    • @daddystewart
      @daddystewart 23 วันที่ผ่านมา

      @@thegamedevcave At 12:53 I assume.

    • @norbert2496
      @norbert2496 23 วันที่ผ่านมา +1

      @@thegamedevcave12:53

  • @leavemealoneimjusttrynavib2687
    @leavemealoneimjusttrynavib2687 16 วันที่ผ่านมา

    Whenever trying to jump from hanging, my player doesnt go up he just stutters a lot causing him to re line trace back onto the ledgem

    • @thegamedevcave
      @thegamedevcave  15 วันที่ผ่านมา

      sounds like it's doing line traces at all times, isntead of just when fallign down, make sure you have a branch to check if the Z velocity is less than 0

    • @leavemealoneimjusttrynavib2687
      @leavemealoneimjusttrynavib2687 15 วันที่ผ่านมา

      @@thegamedevcave It only does line traced when falling. But since the character is stuttering up and down after trying to do it. It has a negative velocity for a few frames causing it to re line trace.

  • @amanitamuscaria5863
    @amanitamuscaria5863 8 หลายเดือนก่อน +1

    Can I do this without the event tick?

    • @thegamedevcave
      @thegamedevcave  8 หลายเดือนก่อน

      no you'll need to check with a line trace during every frame that your character is falling, so you'll need to use Tick

    • @CloudlessStudio
      @CloudlessStudio 7 หลายเดือนก่อน +3

      you can do a set timer by event, start it on a jump or fall, and invalidate it should the player hit the ground or grab a ledge

    • @DMPROD03
      @DMPROD03 6 หลายเดือนก่อน

      @@thegamedevcave You can use timers or a timeline. Event tick isn't needed, and it's better to not use event tick. There are probably more creative ways than timers or timelines also but those were just off the top of my head.

    • @thegamedevcave
      @thegamedevcave  6 หลายเดือนก่อน +2

      @@DMPROD03 people are over obesssed with avoiding tick. Some things simply need to happen every frame, you could probably get away with using timers on this but doing 1 line trace a frame really isnt an issue.
      The reason event tick is discouraged is because beginners have a bad habit of throwing everything in there which is indeed bad. You dont need to check and set every value on every actor on each frame.
      A result of this teaching though is that people go all yhe way to the other side and think ever using tick at all is bad. Its not, its there for a reason you just need to be aware of when to use it and when not too.
      There very rarely is a blanket " X is bad and Y is good" in programming. Having an understanding on what and when to use whicg options for what reasons is key to writing reasonable code

    • @DMPROD03
      @DMPROD03 6 หลายเดือนก่อน

      @@thegamedevcave Yeah, my point was just that is is possible without tick. I do agree that using event tick isn't always "bad"; however, I do believe it's better not to when easily avoided. Also, yes thank you for pointing out that there is not much of "X is bad and Y is good" because that is something very commonly mistaken amongst beginners. Coding and programming is very malleable which is important for people learning to understand because it is a good and bad thing. You can often find different ways to do the same thing and no two programmers are going to end up with the same code.

  • @PANDA-wz8fz
    @PANDA-wz8fz 2 หลายเดือนก่อน

    what is this kind of tutorial ?????????? íts like a maze event trick it says delta second how do i get this when i put there an event trick it isnt there

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

      i'm going to assume you're pretty new to the engine, i'd really strongly advice doing over some of the basics first before trying to dive into a feature specific tutorial because most people making tutorials on features are going to assume you have a good understanding of the basics so they dont have to re-explain every fundamental thing in every video they make :)
      as for this specific issue, event tick is a premade event that the engine provides, you dont make your own.

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

    Is this in Unreal Engine 4 or 5?

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

      should work on either

  • @pandapolygon
    @pandapolygon 3 หลายเดือนก่อน

    this doesnt work on first person or?

    • @thegamedevcave
      @thegamedevcave  3 หลายเดือนก่อน

      the code should pretty much work the same way yeah, but you'll end up with your camera inside or right up against the wall, so you may need to add some stuff or change things to make it work a bit better for that viewpoint