This guy has helped me with my entire video games career. I used to be stuck on everything He helps with such obvious stuff that nobody would make tutorials on and also some stuff I would never think on implementing into my game but it fits perfectly. there is rarely any “actually..” in his videos
Thank you so much!! I love to hear that! I`m glad that I could help you in your game dev journey, I always try to make my tutorials straight to the point and, on subjects that are complicated, and turn them into a easy video to follow😄
So helpful! With the Game Art degree I achieved at Full Sail University and the directions within your videos I will be able to accomplish creating at least one AAA level game.
This is a good starting point and helped me plan out a more robust system, thanks for sharing! To anybody watching this in the future, be wary that this system does not exclude a few features that are required for a good lock on system such as: - Excluding targets hidden behind walls or who are already dead. - Swap to next target (left or right based on input) - Once locked on, the target can move out of range, so you will need a way for it to unlock from targets that exit a distance threshold. (Also for when they die) - A tether point or some kind of camera smoothing so it doesn't follow the player exactly. (You'll find this in games like Dark Souls)
I was gonna say, "yeah but you can tweak it a bit and find other tutorials to fix those as they seem like minor issues" but you did say it's a good starting point which is true.
Hey everyone, an unreal newbie here! Quick question, I've been wanting to implement strafing in my target lock system, if I left the Target Lock variable in and made it public, would I be able to use that to switch between animation sets? Thanks in advance, and thanks for teaching me so much Gorka Games!
Hi, usually you explain everything you create, but this time I felt like you needed to explain what you did at event tick. I’m still trying to grasp the concept of player controller and controll rotations. Could you proviedr a quick explanation maybe? Would be very helpful ❤️
Hi, yeah of course, sorry if I might have left something there to explain. So the controller is a non-physical actor that basically possesses the player (in other words, what controls the player ). So I can access its rotation, and therefore change the whole player`s rotation with a new one very easily. So then I can find the direction between the player, and the targeted enemy, with that handy "Find look at rotation" node. Hope this helps and thanks for the support!! ❤
If you make a target lock, make it at the target's head only at CQB distances or long distances for a sniper. Otherwise, the target lock should be on the sternum / solar plexus (called "center of mass"), because that is how most soldiers are trained and how most people aim instinctively. The Rainbow Six series suffers from AI that aims for the head at any distance.
yeah absolutely. The target lock should aim at the enemy's head, and right now it aims at the actor's pivot. But for this tutorial I was just showing how to make a simple targeting system, without going in so much detail, just focusing on the core of its systems. But if you were to add this into an accurate/ tactical game like Rainbow, I would agree.
@@GorkaGames Yeah, but I mean that Rainbow Six games rely too heavily on targeting the head. It isn't realistic. For example, Larry Vickers when he was in Delta Force still aims "center of mass" when it is necessary to guarantee a hit.
I have a question. As much as I can think, the lock will still work if the opponent is behind a wall. How to avoid that and also suppose there are multiple pawn in front of you it can decide which one to focus on depending on who got hit first but what if I want to switch between those players? I want something like in sekiro where if I try to move my mouse in focus it snaps to the next nearest enemy.
Great tutorial as ever! If we want to switch between different targets moving the mouse or controller stick is it possible to implement? I cannot find any tutorial about that, thansk!
Lol funny thing is, the boolean you said we didn't need, I actually do need it since I made a magic system and I only want the magic to hit the targeted pawn thus the boolean was needed for me to make it only occur if that bool is true~ Very very helpful
Hi! How can I make a target lock for a first person? I tried this way, but it only makes my player look at the location of the target, but not towards the object (for example, if its a little chair, it looks to the direction of the chair, but not the object). I hope you understand my problem, or if you could give me some advice here. Thank you! Love your channel
What do you mean by "break it"? I don't have good internet and can't see the name of the node Edit: I figured out that it was "break hit result" but it will not let me plug the out hit into it...
Is anyone know a auto lock on for a top down I try to find everywhere only for third person character and that's it like doesn't exist pls i really need help
Nice video, I am trying to set it up so that when I kill the enemy, the camera returns to normal. The issue I am getting is that when the enemy dies, the camera always seems to take on the world location value and always turns my character to the same point (world location 0,0,0). Any way of fixing this?
Have you tried creating a boolean check in your camera lock blueprint to check if the HitTarget actor has a particular flag for alive or dead, then check a boolean if the target is alive or dead. If dead, break the target lock. If alive, keep the lock. Hope that helps!
this is probably quite late, but this is where you want to use a Boolean with a branch instead of a FlipFlop. and only if the conditions are meet for target locking e.g. (HitResult = true and any other checks to confirm its an enemy ect.) then you set the bool to true.
This works, but I'm having issues with other axes of the camera. If a target is higher or lower than the player, or if I get too close to the target, the camera goes above me, looking down and I can't move forward. The control rotation changes like a compass and causes the forward movement vector to change on the player. Any advice?
This doesn't work for long distance. I am trying to do it for an aircraft spotting people on the ground. Also doesn't work if there are mulitple enemies..... SO basically serves no purpose I don't know a game that only has one enemy character.
Thanks for the video. Can you make a video for throwing something and recalling it fly back to the hand? I think it super similar to this tutOrial. Thanks
Thank you for the good video, but I'd like to give you a hint: the boolean you created in the first part of the video was the best way to optimize the logic. In the tick event, you should have made a check on that boolean instead of checking the validity of the pawn, because that's a lighter method for the compiler. However, the video is very clear, well explained and goes straight to the point, so thank you very much!
Not gonna lie o think I'm just Dumb because it's so simple it just his pace is fast and I don't even notice the detail I think I'm turning into sleepy joe😅
This guy has helped me with my entire video games career. I used to be stuck on everything He helps with such obvious stuff that nobody would make tutorials on and also some stuff I would never think on implementing into my game but it fits perfectly. there is rarely any “actually..” in his videos
Thank you so much!! I love to hear that! I`m glad that I could help you in your game dev journey, I always try to make my tutorials straight to the point and, on subjects that are complicated, and turn them into a easy video to follow😄
That_Is_So_True🔺
"What's up guys? Welcome to new Unreal Engine Fuck Tutorial!" 💀
thats how you know its good
So helpful! With the Game Art degree I achieved at Full Sail University and the directions within your videos I will be able to accomplish creating at least one AAA level game.
an
2:04
Follow Camera -> Get World Rotation -> Get forward Vector
This is a good starting point and helped me plan out a more robust system, thanks for sharing!
To anybody watching this in the future, be wary that this system does not exclude a few features that are required for a good lock on system such as:
- Excluding targets hidden behind walls or who are already dead.
- Swap to next target (left or right based on input)
- Once locked on, the target can move out of range, so you will need a way for it to unlock from targets that exit a distance threshold. (Also for when they die)
- A tether point or some kind of camera smoothing so it doesn't follow the player exactly. (You'll find this in games like Dark Souls)
Just Use Tags on the light trace, from the option "Actors to Ignore"
I was gonna say, "yeah but you can tweak it a bit and find other tutorials to fix those as they seem like minor issues" but you did say it's a good starting point which is true.
That hair looks great on you and it has physics. Awesome Video
Yeah 🤣 I love how the hair turned out. Thanks!
@@GorkaGames Was the physics applied on the hair tutorial you made as well?
@@AliBounds Yes!!
love the video! but how can I make it so it locks gradually and not teleport??
Hey everyone, an unreal newbie here! Quick question, I've been wanting to implement strafing in my target lock system, if I left the Target Lock variable in and made it public, would I be able to use that to switch between animation sets? Thanks in advance, and thanks for teaching me so much Gorka Games!
Is it possible to do an auto lock on when you approach an enemy at a certain distance?
Hi, usually you explain everything you create, but this time I felt like you needed to explain what you did at event tick. I’m still trying to grasp the concept of player controller and controll rotations. Could you proviedr a quick explanation maybe? Would be very helpful ❤️
Hi, yeah of course, sorry if I might have left something there to explain. So the controller is a non-physical actor that basically possesses the player (in other words, what controls the player ). So I can access its rotation, and therefore change the whole player`s rotation with a new one very easily. So then I can find the direction between the player, and the targeted enemy, with that handy "Find look at rotation" node. Hope this helps and thanks for the support!! ❤
@@GorkaGames Ok, but why doesn’t the player rotet towards the target then? Or is it because we only rotate the camera?
@@atomicshrimpFT this is because we are not overriding the other controller settings. As the the Y- yaw control
@@GorkaGames Set controll rotation doesn’t override the controler? That’s new to me. I guess I’ll just come back to it when I need it😂
@@atomicshrimpFT yeah 🤣 something’s are just confusing but it’s how they work. So the camera boom is basically not being overrided by the controller
We need an updated video about combing this with strafe movements :)
If you make a target lock, make it at the target's head only at CQB distances or long distances for a sniper. Otherwise, the target lock should be on the sternum / solar plexus (called "center of mass"), because that is how most soldiers are trained and how most people aim instinctively. The Rainbow Six series suffers from AI that aims for the head at any distance.
yeah absolutely. The target lock should aim at the enemy's head, and right now it aims at the actor's pivot. But for this tutorial I was just showing how to make a simple targeting system, without going in so much detail, just focusing on the core of its systems. But if you were to add this into an accurate/ tactical game like Rainbow, I would agree.
@@GorkaGames Yeah, but I mean that Rainbow Six games rely too heavily on targeting the head. It isn't realistic. For example, Larry Vickers when he was in Delta Force still aims "center of mass" when it is necessary to guarantee a hit.
I have a question. As much as I can think, the lock will still work if the opponent is behind a wall. How to avoid that and also suppose there are multiple pawn in front of you it can decide which one to focus on depending on who got hit first but what if I want to switch between those players? I want something like in sekiro where if I try to move my mouse in focus it snaps to the next nearest enemy.
Great tutorial as ever! If we want to switch between different targets moving the mouse or controller stick is it possible to implement? I cannot find any tutorial about that, thansk!
but what if i want to do 8 directional movement while locked on? how do i keep my character facing the enemy
How do you apply this for example you want to target specific parts of an enemy like in 0Onster Hunter games where you break specific body parts?
awsome tut!!
couldn't find one on changing target lock? did u make that one too?
Lol funny thing is, the boolean you said we didn't need, I actually do need it since I made a magic system and I only want the magic to hit the targeted pawn thus the boolean was needed for me to make it only occur if that bool is true~ Very very helpful
Can this work for first person cameras?
Hi! How can I make a target lock for a first person? I tried this way, but it only makes my player look at the location of the target, but not towards the object (for example, if its a little chair, it looks to the direction of the chair, but not the object). I hope you understand my problem, or if you could give me some advice here. Thank you! Love your channel
What do you mean by "break it"? I don't have good internet and can't see the name of the node
Edit: I figured out that it was "break hit result" but it will not let me plug the out hit into it...
Hey, this was really helpful but I was just wondering if there was a way to get the targeted enemy location?
Is anyone know a auto lock on for a top down I try to find everywhere only for third person character and that's it like doesn't exist pls i really need help
you are a god send, my friend. Always so thorough in your teachings.
Nice video, I am trying to set it up so that when I kill the enemy, the camera returns to normal. The issue I am getting is that when the enemy dies, the camera always seems to take on the world location value and always turns my character to the same point (world location 0,0,0). Any way of fixing this?
Have you tried creating a boolean check in your camera lock blueprint to check if the HitTarget actor has a particular flag for alive or dead, then check a boolean if the target is alive or dead. If dead, break the target lock. If alive, keep the lock. Hope that helps!
Get forward vector -> multiple splits into 3x for XYZ
ah needed to right click to convert to a single float
After testing it. I’ve got a Message log saying Blueprints Runtime Error. But everything runs smooth🤷🏻♂️
Nice one bud ty
thank you!!!
Awesome cheers for this :-)
6:43 Snap back to reality
but if you miss you have to double tap the lock on key to then lock on because of the flip flip being on B, is there any fix or work around to this?
this is probably quite late, but this is where you want to use a Boolean with a branch instead of a FlipFlop.
and only if the conditions are meet for target locking e.g. (HitResult = true and any other checks to confirm its an enemy ect.) then you set the bool to true.
You can also just increase the radius of the trace, so the chance of missing is very sparce.
This works, but I'm having issues with other axes of the camera. If a target is higher or lower than the player, or if I get too close to the target, the camera goes above me, looking down and I can't move forward. The control rotation changes like a compass and causes the forward movement vector to change on the player. Any advice?
Question how do I remove the sphere trace or make it invisible?
On the Sphere Trace for Objects node, set the Draw Debug Type option to "None"
cool i like how you kept your hair
thanks! yeah I love it 😄
Nice this is added to the list of thing to be added to the game
Great!!
Thanks a lot ! Very helpful tutorial.
there is bug that stops the pawn from receiving damage
This doesn't work for long distance. I am trying to do it for an aircraft spotting people on the ground. Also doesn't work if there are mulitple enemies..... SO basically serves no purpose I don't know a game that only has one enemy character.
Thanks for the video. Can you make a video for throwing something and recalling it fly back to the hand? I think it super similar to this tutOrial. Thanks
Yeah, do you mean like in God Of War with he's axe?
@@GorkaGames Yes, exactly, and maybe the force in star war. Just simple toturials with the concepts. THanks.
Thank you for the good video, but I'd like to give you a hint: the boolean you created in the first part of the video was the best way to optimize the logic. In the tick event, you should have made a check on that boolean instead of checking the validity of the pawn, because that's a lighter method for the compiler. However, the video is very clear, well explained and goes straight to the point, so thank you very much!
1:49 my timestamp
Next police system with stars like gta
yeah good one! I actually have made it before for one of my games, I will see if I can make a tutorial about it
@@GorkaGames yep there are not many tutorial about it
The fact that this is so simple is infuriating.
🤣
Not gonna lie o think I'm just Dumb because it's so simple it just his pace is fast and I don't even notice the detail I think I'm turning into sleepy joe😅
CAMT MOVE THE MOUSE ON TARGET LOCK
Dark souls 🤔🤔🤔
👀👀🤔