Ryan Laley masterfully distills complex engine architecture into actionable workflows, bridging the gap between high-level world management and granular AI implementation. This is a quintessential resource for developers seeking to master the technical nuances of modern game design.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Live Unreal Engine SupportAdded:
Let's try this again.
I have no idea what's going wrong with this thing.
We'll see. We'll see.
So, we went live yesterday. I didn't change any settings between yesterday and today. So, I don't know what's going on.
Uh like every now and then this was like say it disconnected from the um from the thing but I guess not. I don't know.
We'll see how that goes.
Let me know if you get any weird lag issues again. I had to log out, log back in and and do things like that. So hopefully we're back in the game here.
Um yeah, so I think I've said this about four times now. So yes, hello. Welcome to our live stream where we hopefully live anyway. We answer your questions about Unreal Engine, GameDev or anything you want to ask really at all. All you got to do is put your question into chat and we'll try and grab as many questions as we can whilst we are live. Um Oh, good. It seems much better now. That's good to hear.
weird just weird stuff happening all around.
Um I did see a couple of questions go in before it crashed, but I' i've lost them now, so I don't know what questions they were. So if you did ask a question before, I'll put back into chat and um yeah, we'll talk about that. Uh yes, so rank one or McDonald's. Uh hello, I am making a top down game using 50 field of view for better character zoom, but textures of floors look too stretched.
Is there a way for textures to ignore field of view? Uh no. So the problem you'll have there, so let me put in a camera is the filtering that happens with um textures like this and we'll pilot it. Okay. So the the stretching your like the weird sort of I'm guessing you're looking like like this. This is about like when it's like this where it's all like weirdly I don't know doing things like this. Um you need to turn on anropic filtering.
I'm saying it wrong and I am. Um which I think can you do turn on from here? I I have no idea actually.
Uh not a clue.
Uh hold on.
Enable virtual textures and isotopic filtering.
Oh, I have to restart. That may help with that. Uh I won't bother because I'm I'm scared to restart anything. Um, basically meaning basically meaning that you want textures to load in uh virtually with um higher res ones closer to you than the ones that are further away cuz further away ones will get all muddy and messy. Uh, this is very noticeable with like high detail textures or text ones that got very um like fine lines on them. It's very easy to see that effect going on.
So, I imagine it would be that kind of thing. Um, why are you doing 50 field of view? That's kind of crazy.
I know you said a top down game, but what kind of game would you have that kind of view on it? Um, like if you're going for this sort of field of view, normally you're doing it to try and simulate like depth of field and blurriness, I guess. But I don't know.
Um, I mean top down you wouldn't really notice that either. The blur the filtering issue. I'm not entirely certain what you're having too stretched.
Um, it was something I need to see really.
Uh, but there's no way to make textures ignore field of view. Okay.
It is what it is.
Uh yeah, the tilt that's tilt shift iron. Yeah, tilt shift. You can do that effect in here.
Um next question we've got um Chronicus. How would you tackle a large dungeon game from a level standpoint? Imagine one big area but with different wings. Each wing being a different level or one big level with loading parameters.
I mean, depends on what you mean by big.
Um, well, with world partitioning, it makes it a lot easier to put stuff together.
You don't have to really worry about level streaming. It will handle it for you. So, if you don't know already, if you haven't got level streaming turned on, you can see for yourself if you have it by just going to your uh world partition editor. You'll see this. If you haven't got it enabled, you get a little warning saying isn't enabled.
Don't worry, you can always make your level use while positioning by going up to tools and doing convert level. it'll make a duplicate level that's using world partition.
So, uh, with world partitioning, it it will automatically handle that streaming data for you. So, you don't really have to worry about it. So, the rest of it comes down to your organizational skills and how you want to manage that. Now, if I was putting it together, I would probably look at using sub levels to help organize it and help you work with a team of people. So, let's say, for example, I've got this area of the game going over here. Let me zoom in. There it is. Um, I'll select all this.
Usually you can select all it from there.
No. All right. Um, so we set the whole ah controll drag the whole level. uh probably putting minus the the actual stuff like the player start for example and the lights and stuff. Um so this sort of thing and then I'd collapse that into a a level instance or pack level actor. So you make a level instance of it and we'll do yeah center like that and we'll click well actually if you're doing wings you may want to do it to like um a different origin maybe like a certain actor maybe but nonetheless we'll just do that and this will be like uh map wing A. Okay.
And now I've got map wing A. I can drag more of these into my scene and it should Why is it disabled?
World streaming enabled uh uh force load.
Force load.
It's not going to let me bring another one of those. [ __ ] What am I doing wrong?
I know. Been a while. Um, but as you can see, like it's one solid. So, you double click on it and or go into right click level edit, I guess. There you go. And you can now edit this one uh separate from the rest of the world. So, and we hit save, it will save it and make it part of the other thing. Um, it should let us do Whoa. Why is the pivot way down there?
Okay, that'd be why. Okay, it did work, but for some reason it put the pivot in the wrong place. It's going to be way up there. There it is. So, let me undo. Let me break this. So, level break level instance. Yeah.
And let me do that again.
Maybe I messed around with the settings.
I broke it. Um.
Oh, it's cuz I selected the I've got the world selected. Hang on. That'll be why.
So, delete that again. Yeah. Make sure you haven't got stuff like the clouds or atmosphere or something selected. Um, probably what is this thing?
Oh, there. Um, yeah, if I just search up here for static mesh.
There we go. Level create level instance.
Leave that. There we go.
wing. Hey, it's still doing it.
Why is it doing that?
Huh?
Yeah.
Level instance center minimum Z. I'll just do center then.
Okay.
Yep. Yep.
Right.
That seems a bit better now that that's there. There we go.
Don't know what's going on there. But yeah, so you can put together your scenes like you can make little like little uh like little rooms if you wanted to as separate scenes. The benefit this has is that you can have multiple people working on this project and each one can work on a different wing and um you can then and they can do it independently of you working the other wings and then you can see them all come together. So when I want to edit it, I just go into it and edit it and change whatever I want like that. Hit save and that'll all update. So yeah, it's a way of doing cover instances like that. And if you want to make it blueprintable, you can have it as a pack level actor, which is does the same thing, but it gives it a blueprint as well. And that blueprint means you can have in it some code or functionality that's doing stuff in it, too. Um, yeah.
Uh, yeah. And that's how I do the wings.
I'll do them like that.
Yeah. Yeah. It will hand if you're using world petition, it will handle the uh loading for you.
Okay. All this stuff we handled for you.
Um James Mackmore, hey R. I've been following along your um board games vids and I'm trying to get the viewport to switch to the character who's currently taking their turn. Is there currently a way to do it in third person? Yeah. So, in that series, I need to re-record that bit cuz I realized the bit I did record for it got corrupted and I forgot to re-record it. But essentially, you have your camera actor, which is over the top of the level. All you do is on your game mode, you know whose player turn, which character's turn it is cuz you're doing the turn taking stuff. You just tell that camera to go to the actor and you just attach it to that actor. And then when it's someone else's turn, you attach it to a different actor. And you just keep doing that. just keep attaching this actor, this camera to a different actor each time it's their turn. It's simple as that. Uh I just need to re-record it really. Um yeah, so in your game mode, you've got a turn taking thing and you're keeping track of who's which character's turn it is. Just at that moment in time, get the camera actor, attach it to that character, and so when they walk around, the camera will move with them.
Um, Heko 4364, do you have any knowledge about AI navigation when it comes to walls and ceilings? You can't. Uh, not with base Unreal Engine. There are plugins you can get to help you add this sort of functionality in. Uh, but the base default nav mesh generation can't do that. Now, there are ways you can trick it and make it do certain things. Um, basically by doing lots of line traces and lots of calculations to work out if something can move around. Um, we can do a very basic example of that if you want. Um, so let's say I have a little bug character. So, AI bug and this little sphere. Okay. And I'll give it a uh box collision.
And I'm making half a clip through the wall. So I'm just going to turn that up like that.
Oh, make sure the box is there. A separate thing like that. Yeah. So there's there's your bug porn character. Um, and you want to attach them to a wall. So, we'll bring a wall in.
Uh, but as I said, there's no just straight up nav nav mesh generation or anything like that. You do have to sort of pre-program it to how to navigate on the wall. Um, so there's our bug and I'm going to turn it around so it bum is on the wall.
Okay, there's our bug. Now, to make it move along that wall, it needs to do checks to see which way it can go. So, if I also put an arrow on it so we know which way it's facing.
Yeah, like that.
And we see it there like that. Um, you do various things. So rather than you can't do things like AI move to cuz that uses nmesh. You can't use that. So you have to sort of make your own sort of tool basically. Um so make a custom event to move to location and we'll add in a uh vector and that'll be uh world location or surface location we'll guess we'll call it.
and we want this thing to move towards that location. Now there obviously there's loads of complexity levels you can go with this. So if you're just doing one single flat wall and it's just traveling around on that wall pretty simple but if you need to travel around from one wall to around to another wall and then maybe onto the ceiling a little bit more difficult and a lot of that will come down to making a spline and generate a spline around which way you want it to go. Um that way you can do projection onto the walls and surfaces to find out which point you want it to go to. Um yeah so like we need to project a point. So I'll probably make a function here for project uh to location and part of that would be um I want to get the direction I want to go to that location. So let me just put in there like that and we get the direction of it uh to that from actor location.
That gives us the direction it needs to move. And then we'll say to this thing um to check if that location is valid or not um essentially. So that' be a line trace by channel.
Um you want to go out and down. So relatively down. So it would go Hang on.
Let me get the head right.
Um, I need to do probably might be better do a box tray.
Oh, I don't know.
Maybe a sphere trace.
This is similar to a flying AI as well.
Um, so that's the direction. The start location is the actor location.
And I want to actually let's make it so it does randomly. Um, what would be a way of doing that?
Um e uh you got a thing you can use actually project location um no what's it project can't remember what it's called now project point to plane Um maybe it I don't know Huh.
Um, random unit vector. We'll do a random thing.
Screw it. Um, random unit vector uh multiplied by a just the I guess it' be uh oh actually no it be the normal of the surface it's on cuz we can't just say normal out. You obviously need height. So one would be in the zed definitely but x and y be different based upon the normal of the surface you're on. So you probably need to get the surface they're on first. So let's get that first line trace um by channel and that be get actor uh location adding on their up vector shifting downwards. So get actor up vector.
So multiply that by uh let's say I want it to start a little bit above its own head. So although this would be in world space.
I need to get its point in this space in component space which is different when it's on here. So I need to what do I need to do?
Um I need to get the relative down.
So I need to take the out vector here and transform it direction.
Uh inverse transform it inverse transform direction. Get active transform.
Um, no. What am I doing? No, no, no, no, no.
It's cuz it's on the wall. It's confusing me. Uh, and walls can be all over the place. So, I need to get um if I had another arrow on it.
It might make it easier to visualize this.
Do that.
Change color so it's a little bit different.
I want to get the direction of that arrow essentially. So we get that arrow get uh forward vector.
That's in world space, isn't it? [ __ ] No. Uh I want to get the direction of it then.
Get rotation.
Get relative rotation. Get world rotation.
I guess get world rotation.
and then get um uh x vector like that. That should do it. So get a location get the rotation X vector that multiply that by uh I don't know 50 add that on here to get the starting point and the end point will be that point there adding on the No no no no no no no.
get that vector there and I want it to go inwards. So if I take that and multiply that again by -50 and do add on that as end point I think that's right. Uh we'll do for duration I'll do it on tick actually.
So this is just tracking it surface it's on um for one thing.
Uh wait maybe line traces don't appear.
Uh, no.
For one fame.
Make it longer. Uh, 100 to negative 100.
Where the hell is it?
Get a location. Add on this 1,00.
I'm confused. Why? Why are we not seeing the line trace?
Should see something unless this is returning zero.
I don't think it should be. Hang on.
Yeah, it's getting one in the X there.
Negative one in the X.
So, yeah, that's pointing that way.
That's negative one in the X that way.
That's all right. Oh, God's sake.
I'm over it.
Uh, probably got chat screaming at me that I've made that mistake.
Oh, no. It's cool. No one else saw it.
So, um, yeah, I didn't multiply it by a float by a vector by accident.
Yeah, there you go. So, we've got, um, a trace going down to the wall. Okay, so there we go. Um, so now we got that trace, know what surface it's on.
Um, hit result that we break out. And we want the surface normal. We promote that to rebel surface normal.
like that.
And turn that on like that.
And probably collapse that to a function that does like get surface uh surface normal.
Okay. So now we have that surface normal sort out. Um I want to take that surface normal and I want to pick a random vector using that as the pole of it. So I need to do unit vector rotate vector around axis.
I think this one not random unit vector. I guess I want to do the forward uh get the forward vector of the arrow that they're going in. So get wild rotation make rot uh make um sorry not to x vector. There you go.
in there. And we randomize which angle we want to go in. Random float in range minus 180 180.
And that we're just going to debug that working by doing a sphere trace by channel. Not sphere trace by channel.
Um debug sphere at that location.
20. Uh, we also make it do once. We're just doing begin play.
Uh, oh yeah, and that's just the vector. We need to multiply by length. Uh, multiply that by uh float and that could be a distance random distance. So, random float uh in range between zero and a radius of 150.
Okay.
So, what hopefully we see now is a draw debug. We'll draw this onto the wall here. Uh, it's not.
Now, it's not doing the surface normal as it should do for one frame.
Surface normal.
Let's uh Oh, I need to add it on to I need to add this to the capt location.
There we go.
No, why not?
Also, why is it not debugging the line again?
Oh, for one frame. That's why we do it for duration. Um, oh wait, duration here is slow as well.
God's sake, I'm out of it today. Two.
There we go.
There we go. So, it'll pick a random spot on that wall. Okay. So, every time I do this, it should it might be inside of it.
There you go. it pick a random spot and then you tell it to move that location by lurping its movement or applying movement to it by just literally saying um uh we can do let's say a tick event do that and uh we'll do Uh, that needs update all the time.
This just needs to Oh, no. What does it need to do?
No, screw it. Put it back on there. Um, that will give us the location there.
Promote that to the final point.
And on a tick to move it to a location we just do set actor location on uh and v in t 2. And if you want to do constant rate you can do constant rate you want to do acceleration you can do acceleration with vap 2. Uh the current will be the actor location.
Actor location target would be that new variable delta time seconds. So speed of it.
Uh let's do one something slow. And we also then check to see if these are equal uh or nearly equal. So do nearly uh actually just do equals gives you the error tolerance here of the zero. Put in a tolerance of I don't know 10. And that's when you did a move too. That' be like your uh acceptance radius be like that.
I'll do that.
And then I want it to pick a different spot. So I want to make this thing and begin play uh get new. Uh we'll catch the function get destination like get random destination essentially and then do that again here.
And in theory it will move around the wall.
need to do a check to make sure the space is valid though to do line trace to find the surface. Um but it's along that sort of logic. It's not straightforward by all the means. Um yeah, but if you want it to wrap round essentially you're doing a line, you are projecting line traces onto that surface. So wherever he's currently looking or where he's about to go, you line trace in. If it misses, then you rotate it around. It finds a corner and you can make it sort of go around the corner. Um, yeah. And maybe I have to do like a full-blown video on it cuz but the thing is it's such a niche thing to learn about. It's it's more about learning vector maths and dealing with that nonsense. Um, yeah. So, you find if if it's a valid point. Um, so as it's moving around on this tick here, you do the surface normal. Get surface normal cuz that's looking down at the floor.
And I would say then h No, I mean it's too we're going to get too long lost in the weeds. I won't bother. But that's the starting point.
Um, you would then do a trace forwards where they're about to go next in the next frame. And you can work that out by doing this here. you do a trace here to see if it's valid or not. Um line tracing down to its relative down position. Um which is maybe worthwhile to store somewhere um by doing something like uh this get location get rotation.
Uh this thing might be worthwhile to cut to a function to do get relative down and make that pure function.
That might be the good one to do cuz then you can go to the event graph on the tick to uh take the location you're about to go to and then uh add that onto the relative down.
Multiply it by going in and out. Yeah, it it's long. it's long.
Um, and you see if it's a valid surface to go onto, but yeah, there are plugins that can help you do uh wall navigation stuff with AI.
Um, next up we got um, sorry if I miss you. I'm going to scroll up a little bit. Um, um, if I know how to make a character turn 90° when pressing a widget.
Uh yeah.
So let me bring in the third person guy.
Doing it for a widget versus a key press. There's no real difference. Oh, it just crashed for some reason.
Don't know. Uh we'll wait for it to come back up.
Uh, hey co, what about making a sphere trace right where the pawn is and get the impact normal so that it would act like a relative up uh, vector. That's what I was doing with the line trace for the surface. No, exactly the same.
Uh Neilan, how are you? Glad to see you live. I've been struggling a lot with both good looking and optimized lighting for my horror game. Would you happen to have any tips?
Uh only like stylistically, but then everyone's got their own style, so it's a little bit different to say, a bit hard to kind of suggest things. Um focus more about shadows. they're going to be far more important than say lights. So yeah, look into those more.
So um yeah, uh right back on. Nice. Okay, don't crash this time. Thank you. Yeah.
So it it's exactly the same as if it was like in um a key press essentially. Now that comes down to understanding how characters are actually going to turn.
So at the moment he's rotation is designed to follow movement. Okay, which is not what we want. Uh if you want just to turn on the spot 90° with a button push like a single like 90° the character movement component you have to turn off the orient rotation movement or at least turn on as well turn on use controller desired rotation. So you turn that on um and if say let's okay let's turn off orient rotation movement. If you're doing like a point and click sort of thing as well, um you're probably not using your controller rotation as well to handle movement as well. So when we're doing things like look, mouse look and all that, that wouldn't be doing any of that either. So we can turn all that off.
So the character here is what it is.
Okay.
Now, if I want it to turn, so let me say like rather than hitting um a widget key, I'll just do it to one and two. So, debug key one um and debug key two.
The thing you're manipulating is control rotation. So, it's been told to use the orientation of the control rotation. You can easily do that. So when we push one, we get the current uh control rotation like this and then we add onto it or combine it. Sorry, it's a rotator.
Combine rotators. Combine it with 90° in in the Z and then do set control rotation up, which you need the controller for. So get controller and if it's AI controlled or player controlled, it doesn't matter because this will refer to any controller. We do set control rotation there to that new rotation.
Okay. Do exactly the same for the other direction and just make it negative like this. And the thing to make it uh control the speed of its rotation is handled in the character movement component too. In the rotation settings, you just change the rotation rate. So 500 degrees, it means it can turn 500 degrees in 1 second. So if I want it to do one 90° second turn per second, I can change it 90 and you get a slower turn rate then. So hit play. I'm going hit one. Oh, the camera tell the camera not to do move as well. Hold on.
Uh camera, we'll say don't use pawn control rotation. And we take not to inherit any of the stuff either.
Okay. So, one.
Okay. I'm just hitting one or two. Then it' be exactly the same if you're doing it with a widget. It's just you're calling a function on the character to do those turns.
Obviously, type with an animation as well.
Okay. If I want to move a bit faster, let's say 90° is 1 second is too slow.
Maybe want to change it to half a second. So, you put in 180. Okay. In there. Uh, this is also the same way you do things where you want the character to turn quickly, like do a 180 turn.
Exactly the same method. You hit a button and add 180 to their control rotation.
And uh, yeah, that's kind of it.
Uh, how to set up a spectating camera for when players die in multiplayer games. Uh, depends on what you want your spectating camera to do. Um, do you want it to just circle around your dead body or do you want to be able to fly around and look around at things? Uh, what do you want your spectating camera to do?
Uh yeah, Kashan, we can go and fill that in a second.
Attach follow other alive play live players. Okay, so um let's do that then. So uh you need a spectator camera. So, that would be a different class. And if you want it to be like a sort of over the shoulder type look, if even it's a first person shooter type of game, um maybe doing a spring arm, but you just do your BP spectator cam, death cam, what you want to call it, spring arm, camera.
Okay. And when you die, so let's say this is my event for death. Okay, we want to spawn the spectator camera in.
So spawn actor from class. We choose a BP spectator.
And um what may be the best thing to do is have this handled actually on the player controller. So the controller is a central location for all of this thing. Uh, you could probably make also make the camera if you want to have some control over it, have it as a porn. Um, if you just want to follow people around, then you can use it as just an actor on its own. Um, actually, I might change it to a pawn just for the sake of it. Um, so let's change it to a pawn.
Um, yeah. So, I died and we spawn the camera on. I get the player controller that's or the controller of this actor, whatever it is, and I told them to possess um this new pawn. Okay. And when they do that, their camera's going to switch over to it. Now, if you're not using a pawn, you just do set view target to camera and store that as a reference somewhere. Um that's all. As for the spawn transform, this will be attached to the first character. you right now you can leave it at 00 0 and then attach or you can do attachment straight away whatever that may be. How you get the next character is up to whatever type of game you're doing. So if you're doing like a team based game maybe you only want to attach to your teammates in which case you want to get hold of the players in your game. So, an way of doing that if you're doing a multiplayer game, which it sounds like you are, we do get game state, get the player array to get the player player states, and then we'll do get a copy.
Um, in fact, I I'll do this actually on the actual camera because it's a porn. I might as well to do it there.
Uh, yep. Um, yeah. So we get the current index which will promote to a variable index and this will now give me the player state and then from there I can get the pawn from the player state and then I attach this camera to it. So attach actor to actor that be parent actor and this will be a custom event of saying um spectate next player.
And what you could do actually take your index here, increment it or you you can make it cycle rather than incrementing. I guess uh to do a cycling index, you need an array of what you're doing.
So like here for example, we got the player array. We on the index here, we add one to it and we check to see if it's a valid index.
And then we do a select int to determine whether or not we are resetting back to zero or moving on with the next one. So if it is uh valid and a we want to use that value. If not it'll be b which is going to be back to zero and then we set it to the index.
That's a cycling value. So when we reach the end of it, it just goes back to the beginning. So, uh, in this attachment, we do, um, snap the target like that. And, uh, yeah, let's keep going around around. So, that can be bound to a key on here. So, we'll do, I don't know, uh, debug N key for next, I guess. We'll do spectate next player. And you do one for spectate previous player if you want. Uh but yeah, that'll do that. So, uh yeah, that'll do there. Cool. So, if I were to play this in multiplayer, so let's say I've got three players and we got listen server and new editor window.
Bring those across.
And let me just Oh, I've lost the um rotation controls. I forgot to reconnect them. That's fine. We don't need it. Put one there.
Put one over here. And in this one, I'm going hit K to die. And then hit N. I've got to take the spring arm off.
Collision.
Hang on. Let me take the collision off.
Spring arm. Collision.
Uh, it starts at 0 0 because I forgot to give it a starting index. So, basically, I want it to do This on begin play.
Uh yeah.
So he's over there.
He's over here. And this guy, we're going to die. Hit K.
And I can now cycle between. So at the moment it's cycling on me, the dead body, but that's no good. But never mind. I can hit N and I can cycle between the different characters.
Okay.
And that's essentially it. Um yeah.
Um, yes. Kishan control rig. Uh, to attach my character's left hand to the socket of my weapon. Can you explain how to do that? Um, you need to uh it depends on your setup of your control rig and the IK setup you have for it.
Um, you have an effective location of where the IK needs to go. So, uh, what's a good way of explaining this one? Um, so your your character will be in a pose already. So, let me see if I could if it works with this one. I don't know if it Oh, no. It doesn't it this doesn't have uh armor. Okay.
Um U.
Oh, god. Um um without going ahead and making a whole thing uh so I'm trying it's easier to it's easier to explain and show it in the animation blueprint. So I might have to do it in there. But the same concept applies to here. It's just you have to set up all the controls and things like that. Um, let me demonstrate briefly roughly how it works in the uh animation uh blueprint. So, you have as part of it a IK node. Okay. So, you can probably uh CCDK might work best for that sort of type of motion. What CCDK basically does, it's circular. So basically it's good for arms because arms are pretty circular like you do like your bends or c like circular motions. Um using the control hand adjustment it's I haven't got that pack installed on here um in this project. I have to bring it for the fab marketplace and all sorts of things.
Um I wonder if I can easily add it actually. Hang on.
Arena third person template.
H I won't buy epic.
Uh you used to be able to get from here.
Oh, I'm misremembering that.
Home. No. Hold on.
Epic Games.
UI samples.
No, that it's really annoying because they haven't made it as easy as it used to be. Like it used to be really easy. I could just go into here, add feature content pack, and pick whether one add the third person, but I can't pick which variant I want. Um, and I believe someone told me you can do it from Fab, but I don't see it.
Um, I I I'll show you. I'll explain. IK.
Anyway, so IK you have anector. So theector is basically the bone that you're trying to move to that location.
So in other words, your left hand. Um, so you you choose what space your coordinate is. You're going to send it.
So usually your gun you want to put in world space or even component space depending on your setup of your character. Um, so let's just say world space. Then the effective target would be the hand. So it' be hand L. The tip bone for this would be hand L. And the root bone for this for the CCDK would be the clavicle. So it takes into account the upper arm, lower arm and the hand.
So do clavicle L like that. And then the effective location uh will be the thing that uh the location of the actual socket on the gun. So, and what that will do is uh I wonder if I can actually just plug in Hang on.
Uh rifle.
Can I just do that? No, it's need to be a It can be an additive. Hold on. Rifle idle.
There you go.
Yeah. So, as you can see, it's going to 00, which is down on the floor between its legs. Um, so you just give it the location of the socket on the gun that you give it. So, um, let's say, for example, it's going to be, um, actually bit off. If I promote a variable, I can easily do it in here then, uh, compile first. There you go. So as that moves out, move up like that. So you like give it the location. You can kind of see how it this would work. Um and you have a CCDK node in the control rig too, but you can also just do it in here if you like. U you just need to pass through the location of the socket of the gun that needs to go attached to it. um and it will be stuck to it. And if you wanted to let go of it for any kind of animation, you need to have an alpha fed into it from the animation to tell it when to let go of the gun.
Otherwise, it will stay stuck to it as it's animating like a reload or something. Um so an example of that, you have an alpha in here variable alpha. Uh name it better than that. But if I change that to a reload like this.
Okay. The problem that would have is that the uh it would do weird stuff like that. So you need it to not be using this as part of the animation. So in the animation you set up an oh there you go.
Disable left hand IK. You can use that curve to get the information. That's what they're doing right here. So it just uh disables it here. Okay. Um although it feels like it should be more than that.
Uh don't know.
Don't know. Um, um, I forgot how you get that curve out.
Nope.
How do we get that curve out? I forgotten entirely.
Is it in here?
Get curve value.
Curve name.
Copy.
Oh no.
What's it called? Disable L head I no gap.
Yeah. So that return that value and then you can use that as the alpha.
Must be inverted. I can't remember now.
might be in bed.
Uh, no, that that ain't right.
I've forgotten entirely how to get that curve out.
Curve data. Get curve.
Get all curve names. Get active curve names. Get there. Get that.
That makes no sense. Unless I spel it wrong.
Wrong curve name.
Disable land IK.
Disable. Oh, L hand IK.
Okay, let's put that back in.
Still doing funky business.
Print string that.
Yeah, it's looking at zero.
Let's make sure it is spelled correctly.
Yeah. Yeah.
Uh why is that not coming through then?
Time to look up online in the documentation. So, animation blueprint get curve value from anim.
Yep, that's that's what it's doing.
Unless it's only a runtime thing. That is the right thing to do.
Oh, yeah. Runtime thing.
Yeah, only run time.
So, yeah, that works.
There we go.
Um, next question.
Um, how to make a shark swim. Um, yeah.
Whoops. back to this sort of AI bug type thing. So in this pawn, we do AI shark and this thing is going to be constantly moving. Okay, so in here we're going to add floating uh add pawn.
Hang on, where's it going? Pawn floating pawn movement. That's because I typed in ad. So you go go into here, change the speed of that down to like 300.
And on the tick here, we just add movement input.
And the world direction is whichever direction you want to start hunting in.
So this could be something that is updated frequently, um, randomly, all sorts of things. So, for example, you could do like a line trace out to see if it's going to hit anything and then it will turn to a different location. So we could do a thing where uh we get the uh let's do a forward trace get actor forward vector and get a location line trace forward.
That would be that plus a quite a large distance on the forward vector. So that would be multiplied by a float. And you can even tie this to the velocity of the character if you wanted to. But let's say we do 600 on that and put that there. And then that will do the trace. And if it hits a wall in this detection, we want it to change the direction that he's going to go in in.
So if that is true um I need to um I guess actually I don't want for vector I want that movement vector um let's put variable movement direction there you go um yes if it's true we just set movement direction to another random value. Yeah, just do get unit random uh what's it? Random vector. That's not get, is it? I keep forgetting. Yeah, random unit vector.
Set moving direction. Screw it.
Obviously, you can be a bit more realistic with it by not doing completely random, but it hits something, it changes the direction of the movement. And over here, you just put in movement direction. that default with that will be uh the forward vector get actor forward vector like so. And what you do is you want it uh move the if you if it's trying to reach a certain location such as a hunting prey, you need to do some clever tricks with the rotation of the trace here. So rather than doing it completely random, you are rotating it away, but as soon as it's free, you're trying to work out the direction. There's another line trace going between it and its target, its prey, and seeing if there's movement, it can possibly go there, too. And if it can, it will rotate towards that location, too. Um, yeah, that's that's basically it. Um, there it is a lot of fine tuning of that sort of thing. There's my shark.
Uh, play.
Would help if I put him in a place where he can actually bump into stuff. There we go.
Or not.
Um, I did put fortress on. That's why.
dummy.
Oh, you also need it to follow the rotation movement um as well. So on here we set actor rotation based upon the movement direction.
Uh we get control rotation get uh no no we we'll just do this um uh to rotator uh make rot from x and we'll do an r interp get actor rotation Delta time delta.
Oh god.
Delta world seconds. There we go. And three.
So now he should rotate based upon which way he's moving.
Yeah. And now he's not going to bump into anything because obviously there's nothing up there. Um, but you can start like putting stuff around and see if it avoids it.
Is that going to hit something there? I think it is. Oh, no. I missed it.
Uh, yeah. Yeah, you get the gist. Um, yeah, it's basically it. Uh, it's a lot more.
It's all line trace math. Basically, anything that's not traditional movement on a 2D plane, like a normal character is moving, is going to be just line trace math. Um, you do loads of line traces out to work out which direction should be going, which one's the best, uh, which is the best, uh, distance, direction, and if you want, you can even put out probes and the probes then can determine which one is best to use because it's that probe is closer to the target, that sort of thing. Um, yeah.
Um, Asmond Han. Hope you time for this one.
Well, now you click and hold aim button to drag the crosshair around the screen at the same time while not moving the actual hand. I thought I did that the other week.
Did I do the other week?
Was it you? I think it was you who asked for it, wasn't you, Admund?
Um, can you talk about how you'd modify tone mapping and assets to change the look of the game, please? Uh, again, depends entirely on the look, but you're looking at post-processing.
Um, all sorts of things you can do with that. Um, so there's just general color mapping things you can do. Um, so if I click on this post-processing volume, some basic things you can mess around with are going to be the color um color grading things. So changing uh things like the saturation, moving the saturation up a little bit to get brighter colors that pop a bit more.
Um, maybe you want to change with the shadows and and and things like that.
Maybe you want to do more cell shaded stuff, you can do that, too. Um, but yeah, mess around with all this stuff in here. Um, you can even bring in uh some actual changes to the colors. So, if I go to say the shadows here, I might want to bring the shadows up a bit. So, I just bring those up and gamma those ones up as well.
Yeah, you kind of see it doing like more flatter sort of shades over there.
Make it sharper with the contrast.
Flatten it out with the no contrast.
Uh you can even do like little colors on it as well. So do some gain on it. Uh the the other ones are better as like 0 to1 values, but you can make them colored if you want. Um gain is a bit nicer when you add a bit of color to it.
So this is still doing shadows. So you can see the shadows now getting a bit more pink in them, bit more blue.
Yeah. Um obviously all depends on your style you're going for. You may not even want shadows at all.
um you know do as you do uh but that is just that side of stuff doing messing around in there. Um you can also mess around with obviously the post-process material and modify the material greatly as well. Um yeah so we can do no shadows. Maybe you want more stylized game like this. Um maybe you want to be flatter. Um, we take the uh make a new material in there. We'll make some post-process material and we'll do a scene texture.
That one we'll use the post-process input zero.
As you see, it goes in there. We can swap that out and get the base color and divide that by the base color.
And you'll get the lighting data.
Yeah. And if you wanted to, you can then subtract that from this.
Or is it subtract? I can't remember now.
No, not subtract. Um, uh, I forgot. Hey, we'll take all the color out of it. Uh, the sh all the lighting out of it by this method. It's something like this.
Um, if you want to step it, by the way, if you want to make the shadows here have um, uh, like bands on it, you can do that here, too. You can change this to be, um, uh, let's say, uh, I don't know, um, multiply that by, uh, four, round, and then divide by four.
go into there. You'll get these sort of bands appearing. See the shadows bands?
They're a bit bit noisy. You might want to clean it up. A good way of cleaning it up is by changing where this post process actually fires off. So if you go down, you'll see blendable location. At dome mapping, change it to before depth of field maybe and you'll get very different results coming out of it. Uh let's try the after depth of field.
Cool.
And let's try before bloom. Bit more noise on that one.
Replace the tone mapping.
But probably before depth of field or after depth of field doing stuff like that. Yeah. Um, and if you wanted to do that just with um the scene like this.
Uh, that's not right. On See, I'm I can't think now. No, I definitely want to do the divide divide that by that that I can't remember. I have to look it up.
um make so much stuff if forget all the time. Uh but you could do things mess around the cell shaded type of look. Um a good one to look at was uh a talk by Chris Murphy from Epic Games. He done a talk at GDC uh a couple years ago that's on YouTube and he goes through some different stylist effects you can do with this stuff. Um you can even do stuff that affects just the sky as well. So that postress material, there's a sky option you can turn on for his sky and that can make it affect the sky as well. Um yeah, check out his talk. He he goes into a lot more detail and goes through different um aspects. It's quite a good one to look at for those sort of things.
But yeah, it's just a matter of playing with it. Obviously, it depends entirely on your style of what you're trying to do. Um, I don't know what you're trying to do.
Um, what you're looking uh, Mr. John, the the the dirt will look more muddy or sharp or whatever. Talking about realistic styles, uh, they're going to be just textures, modifying textures.
You can change the sharpness of your textures. You can do all that. That's just texture work. There's a point where texture work and postprocess have there's a marriage between the two, but you do have to think about one messing around with both if you're going for that sort of style. Um, yeah, that was a cool one. could do uh that to like 100.
There you go. You get that sort of like effect.
could be quite cool.
But yeah, combination of everything.
I turn my shadows back on.
I don't know. Mess around with it. Um.
Uh.
Yep. Brian is right. Switch to point lights if you can. No, spot lights if you can. Point lights are very not not super expensive, but they're kind of wasteful in a lot of spaces because they obviously pushing light out in all directions, which is far more expensive than just a single direction.
Um, how many years of experience do you have with Unreal? Uh, I started when my son was born, so nine, I guess.
Uh then I've got to go now because I got to go into a meeting with someone. But uh it was someone else has been. Sorry.
I don't have time in unfortunately doing more golden eye stuff today. Uh um can you show how to make lighter certain areas of a space? Uh so post-processing and and uh volumes are going to be useful for that. So do a quick example of that.
Uh, let's go and make a space here.
I should have made it bigger. Um, yeah, should have made it bigger. The So at the moment the game I mean at the moment has auto exposure turned on. So as you're playing your eyes are going to adjust no matter what scene you're in.
Right. So I need to let me just change it to use the first person. a bit easier to There you go.
Okay. So, um auto exposure is going to kick in and and do a lot of the work for you. Um now, if you like me and have it turned off cuz I don't like auto exposure.
Um turn off uh your room's obviously going to be dark. So, the way you get around that is by putting a post process volume into it and then changing exposure at a local level. So you do postprocess volume cover the area with your volume.
Remember also the volume only applies with the camera inside of it. So unless you made it unbounded, but if you're walking around and you're not wondering why it's in third person, that would be why. So, our post-process volume, we just go on to the settings for this and we go down to exposure and we can do exposure compensation and we just up it like that. Um, and you can now see more inside the room that you did before. And you just mess around with that sort of setting to help get that. Obviously put a light in there. Uh so I go to light. Uh probably in this room probably best with um a wreck light that.
But it does mean that the light is going to have more effectiveness in here because the exposures up has been increased.
So yeah, just a matter of doing things like that.
So that is with the postprocess. If I turn take that off.
Yeah, big difference. And there's other things you can turn on. And obviously I've just done one setting. You can mess around with other settings in here too.
Um yeah, you can also change reflection maps as well, color grade it as well. So maybe you want to indicate that's a dark cave. Maybe that's where color grading comes in. Um you'd go down to color grading and globally gain it and we'll add make it a bit more dark and dank.
like this and you get more of a cave looking feel.
Yeah, that's all.
Um, but unfortunately we do have to end it there cuz um I know we running over and had a weird start, but um yeah uh we'll probably be live again tomorrow. So, tune in live tomorrow. Tomorrow be more a hangout. We're going to do some voting on a competition that my investors uh hold hosting uh called Rising Tide where we get to look at uh 10 indie games and vote on which ones we think would be uh good candidates to go forward, who should win that prize. Um and also just generally hang out and and chat really.
Um so yeah, tune in tomorrow for that live stream. Um, otherwise, uh, look afterselves, be safe, and have fun developing, making games, and I'll see you tomorrow. Bye everyone.
I'm from the UK in Essics. Bye-bye.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











