Ledge Grabbing Tutorial Unreal Engine Blueprint

  Рет қаралды 5,297

The Game Dev Cave

The Game Dev Cave

Жыл бұрын

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

Пікірлер: 47
@user-gn8gr2qm4o
@user-gn8gr2qm4o 2 ай бұрын
This is a good tuto video. Other videos from other KZbinrs just speed through without explaining in detail, leaving us begginers confused.
@mileman5072
@mileman5072 8 ай бұрын
Great tutorial mate! I love how you explain what you are doing and why!
@thegamedevcave
@thegamedevcave 8 ай бұрын
Thank you! Cheers!
@Tramicful
@Tramicful 2 ай бұрын
Great tutorial, thanks a lot, love your way of explaining things, always great to mention shortcuts too.
@thegamedevcave
@thegamedevcave 2 ай бұрын
You're very welcome!
@cheerswilliam1973
@cheerswilliam1973 11 ай бұрын
Thanks for the video, really helpful start
@cheerswilliam1973
@cheerswilliam1973 11 ай бұрын
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 ай бұрын
@@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 ай бұрын
@@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 9 ай бұрын
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.
@dafe1115
@dafe1115 8 ай бұрын
Been trying to do the same method for a 2d game. It seems to just rotate the character and makes them fall
@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
@haxan4786
@haxan4786 Ай бұрын
I love it, comment for the algorithm!
@thegamedevcave
@thegamedevcave Ай бұрын
appreciate it!
@joeypouladi
@joeypouladi 6 ай бұрын
Super Helpful 👍👍
@bakmau8330
@bakmau8330 2 ай бұрын
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 2 ай бұрын
ah nm I found that if set off the capsule forward it works better
@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 3 ай бұрын
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 3 ай бұрын
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 3 ай бұрын
@@thegamedevcave Oh Thanks! ill check that as soon as i can
@alonshamash9343
@alonshamash9343 12 күн бұрын
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 12 күн бұрын
i dont think this video should rely on any previous video's ive made? what part are you getting stuck on?
@daddystewart
@daddystewart 6 күн бұрын
@@thegamedevcave The state machine/event graph portion at 12:53
@daddystewart
@daddystewart 6 күн бұрын
@@thegamedevcave At 12:53 I assume.
@norbert2496
@norbert2496 6 күн бұрын
@@thegamedevcave12:53
@ericdrob
@ericdrob 6 ай бұрын
Yer a saint!
@PANDA-wz8fz
@PANDA-wz8fz Ай бұрын
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 Ай бұрын
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.
@amanitamuscaria5863
@amanitamuscaria5863 8 ай бұрын
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 6 ай бұрын
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 5 ай бұрын
@@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 5 ай бұрын
@@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 5 ай бұрын
@@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 Ай бұрын
bruh there are 20 different get velocity and u make a cut scene so noe one know what you picked
@sonicallys_corner
@sonicallys_corner 3 ай бұрын
Is this in Unreal Engine 4 or 5?
@thegamedevcave
@thegamedevcave 3 ай бұрын
should work on either
@pandapolygon
@pandapolygon 2 ай бұрын
this doesnt work on first person or?
@thegamedevcave
@thegamedevcave 2 ай бұрын
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
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 4 МЛН
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 43 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 30 МЛН
Make a Realistic Head Bobbing Effect in UE5 (First Person)
8:14
Eremental Studios
Рет қаралды 79 М.
UNREAL ENGINE 5 HOW TO PICKUP AND READ NOTES TUTORIAL
27:52
AMMediaGames
Рет қаралды 15 М.
Blueprint Interfaces | Unreal Engine 5 Tutorial
14:41
Tyler Serino
Рет қаралды 37 М.
How to Make a Grappling Hook in Unreal Engine 5 - Very Easy
10:02
Finally! UE5 Events Explained for Beginners with Practical Examples!
13:49
Unreal Engine 5 Tutorial - Pushing Blocks Part 1: Moving
17:56
Ryan Laley
Рет қаралды 11 М.
Need to Know Nodes in Unreal 5 Blueprints
48:59
Cason Quisenberry
Рет қаралды 65 М.
Key Mappings in Unreal Engine 5.3 Enhanced Input System
13:59
Event Dispatchers | Unreal Engine 5 Tutorial
19:09
Tyler Serino
Рет қаралды 24 М.
сюрприз
1:00
Capex0
Рет қаралды 1,3 МЛН
i love you subscriber ♥️ #iphone #iphonefold #shortvideo
0:14
КОПИМ НА АЙФОН В ТГК АРСЕНИЙ СЭДГАПП🛒
0:59
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 13 МЛН