For anyone stuck at 12:33 who're using niagara instead of cascade, the node you want is called "spawn system at location" instead of "Spawn emitter at location"
Thank you Mistah, I appreciate you 🙏 I really try my best to teach rather than just demonstrate. Let me know if you have any suggestions for a course you would be interested in
Another home run, I am watching it right after the damage system video and I love how modular and expandable this projectile system is. Thank you for these tutorials you are the best Unreal teacher on UA-cam hands down.
If you're like me. When you get everything to work and shoot the projectiles. If your camera zooms in with every attack. Go into your Projectile Base -> Box Collision -> under details collision -> Set Collision presets to custom -> and ignore the camera 💪🏻 Ali covers this in the very beginning of his A.I tutorial and this is another way to make sure your camera doesnt act up on you, if it ever does! :D So again. If you have camera issues with things like characters and various other things. BoxCollision of BP_desired_choice -> Custom Presets of Collision in Details -> ignore camera = saves the day! Im still new and trying to help my fellow newbies if they come across similar hiccups 💪🏻
For others that might attach this to a real player character: - To avoid the collision with self you also need to add "Ignore Actor When Moving" inside the Character Blueprint (or wherever you wire the attack). Otherwise it doesn't work properly. This is also stated in the comment of the method. In this case the target is the CapsuleComponent, and the actor is the return value of the "Spawn Actor Projectile" method call. - If you have an impact particle / niagara that is flat (e.g. I have some kind of ring with fog from a laser - in isometric perspective) you want this particle to be oriented against the impact object's surface. You can achieve this the following way: From the "Break Hit Result" node you take the "Ïmpact Normal", then "Make Rot from XY" - X and Y Input is both times the "Impact Normal"-Vector Output of the Hit Result. Then the ring will be oriented with it's edge to the surface. The only thing to do left is: Break Rotator -> Add 90 to the Yaw (Z) Axis -> Make Rotator from original X and Y, and the addition result. Use this rotator as input to "Make Transform" -> "Spawn Actor Projectile". I don't know whether this is the best approach though - but it should work for all kind of flat designed projectiles where the particle's surface is perpendicular to the floor (meaning it has no rotation applied at all) - spherical projectiles will not be influenced. - If you use a Paragon Character that has a Weapon included in it's mesh, there is always a specific socket called "Muzzle_01" or similar - you need to look this up in the Mesh. So to offset your projectile from exactly where the Weapon is, you can just use: Get Socket Location (Target = Get Mesh From Player Character, In Socket Name = Muzzle_01). You can use a variable here if you have multiple characters and so on. This is just to know how you can accomplish this. This needs to be used as the location Input for "Make Transform" -> "Spawn Actor Projectile". The socket location will always be according to the animation automatically - this is so cool :D! - All of these points have led to a good result - but sometimes I can still outrun the a projectile and clash into it :D. I think for a real player character one should add the velocity of the current character to the velocity of the projectile - as it would be in the real physical world as well. This way one shouldn't be able to ever catch up to the projectile, and you have the real doppler effect when running forward / backward.
@@AliElZoheiry NP - Sorry the first point was actually covered in the end of the video. I was programming something else in the meanwhile and just finished to watch the video for the connection to the damage system. Time for the first trash mob :D. Short suggestion - that nearly no UA-camr does - for your Smart Enemy Playlists, and Playlists in General - always put a link to the playlist it is placed in into the description (link back) - because when I land on a random video and decide to watch a playlist from the beginning, I want to be able to go to the playlist directly. The Cherno (C++ Game Engine Dev - where I currently learn - does this too). I always wondered why no one on youtube is doing this...
Another added tip to the paragon character point, if the projectile is firing to only one location when you're not specifying a target, you can set rotation from the make transform to either mesh rotation or camera rotation, camera rotation made the projectile getting fired to where you look :D
When I put the ignore actor it ignores my player but it also is not effected by any other object so it won’t be destroyed. Do you know what the problem might be
Really excellent. You have a great pace. You're covering a lot of great content quickly and concisely while at the same time carefully narrating and explaining everything you are doing. That's a very rare ballance. I've subscribed.
Agreed, subscribed as well. Hope you can continue doing tutorials like this. I really liked that you mentioned the current best practice for VFX. I want to learn what to do to optimize a game before doing a lot of counter productive things if I were to make a very graphically demanding game. I feel like it’s the perfect time to start game dev now (UE 5.3) with all the nanite capabilities that just came out.
I frickin love this man. I have been in tutorial hell for the past 2 months, trying to learn as much as I can with UE5. There is a huge trend of tutorials not really explaining why they do things and rather, just show you how to achieve it... so I never really learn. Your vids are genuinely the first time I can follow along, learn, and get the result. It would be amazing to see your take on how to do a climb system in ue5 (most climb systems are old and outdated). But anyways, Thanks for all these amazing tutorials! I plan on watching all of these vids to get some ideas for my first project. (Also, congrats on 10k subs!)
Hey, I'm really glad you think so. This is exactly what I'm going for. Teaching, rather than just showing how to do something, so I'm happy you see the value in that. Thank you for the suggestion for the next tutorial I'll definitely consider it
for someone who has learnt unity and has been a professional for 4 years, Your content seems like the best to get started from!(after watching some beginner stuff from unreal sensei)
Thank you for your kind words! I'm glad to hear that my content is helpful for transitioning from Unity to Unreal Engine. Keep exploring and creating! 🎮
Such an amazing tutorial. Hands down the best I've watched. You're not only covering inheritance / dispatchers / interfaces but also showing us how to utilize them. I'd be interested in a course about weapon selection system where you can switch over different weapons.
You're very welcome! Thank you for your kind words and your suggestion. I'll definitely consider creating a tutorial series on weapon selection systems in the future. Thank you for watching and commenting 🙏
If anyone is wondering. The set velocity in the RotateToTarget event is an kind of an "auto aim" from the instant you spawn the projectile after setting a target, the homing part in constructon script does the homing part in the sense that you can shoot the projectile in any direction before it homes in on the target. At least that is how it seems to me after testing the script. Cheers to Ali for good content!
Thank you! Glad you liked it, if i make a series it'll definitely be an RPG series and will include things like NPC vendors, but I haven't planned that yet
Halfway through. This information is sticking cause I debugged some errors I made in the last video on my own. Very helpful! I got two simple modes to make after I get through a few more of your videos. Thanks!
That's fantastic to hear! I'm so glad the content has been helpful for you as you work on your game. Good luck with the rest of your development journey! 🚀
First off, great tutorial. This added a lot of clarity for me. I'm trying to figure out a way to have this work on multiple targets. It seems that when this locks onto a single target it has trouble with proximity to other enemies. But for single target this is great!
@@AliElZoheiry you’re welcome. And pretty much exactly that. I ended up disabling the homing and attaching the spawn to a camera boom. I have a lock on camera system so now any direction the camera “player” is looking I can hit enemies, above,below, etc. I appreciate you this definitely helped me in my indie game!
If you're at 26:13 and your ice projectile is not rotating to the direction its being fired, go to your world viewport, click your ice projectile, click ProjectileMovement system under it, and check "Rotation follows velocity." I'm trash with UE5 but had to find that one out myself and feel accomplished. Maybe it helps someone.
Thank you sooo much man i just started learning this engine and this is exactly what i wanted to do. (With some changes of course). God i love this video ❤❤
You're very welcome! I'm glad to hear that it was exactly what you were looking for. Good luck with your learning, and feel free to make it your own! Thanks for watching and commenting 🙏❤️
Perfect Video - Exactly what I was looking for. I really like that you come from a Software Engineering Background (like me). I was already asking myself how I should structure certain things - as the engine and the huge API is quite overwhelming in the beginning. Glad to have found this in your videos (many do not incorporate this). What also really helps is that you seem to use exactly the intended API functions for their correct purpose - this is also something I was not seeing that often on youtube - same time asking myself whether a certain approach is the right one (some people compute super complex vector math although there is an abstraction or higher level API in the engine). Anyway - I already subscribed and will watch the whole enemy AI series and all other videos for sure. Thank you for the good work!
Hey Genonaut, thank you so much for your kind words and appreciation. I was reading this comment with a smile on my fave because I was trying to achieve exactly what you mentioned, and help give clarity on exactly those issues you were facing. So I'm very glad that this was helpful for you and I appreciate your support 🙏
Good video, but the zoom in portion when you're clicking seems to cut off portions of where you click and it misses. Because you don't state the full command, it's sometimes harder to follow along. If can prevent a super zoom, it would be pretty helpful :)
Love the videos. There does tend to be a problem in this video in the last 10-15 minutes where certain blueprint nodes (like the projectile targeting stuff) is clearly made off of the recording or edited out and the audience has to guess at what you're doing. One example is the target variable was made in the enemy blueprint, but it was not accessible in the player blueprint so I had to assume it was the same one (you just drag and drop it so clearly it was made off-screen). The other instance of this is the not exploding on the player. This was also made but not recorded. Other than that great video, excellent quality, and great content. Following along is easy and the video is quite well made overall. I'm enjoying following your videos and adding them to my own game portfolio
Hey, I'm glad to hear you're enjoying the content and finding it helpful. I understand the confusion, but nothing was done off camera really, I just migrated the entire projectile project into my other damage system project which I have a full tutorial on as well, so you can follow along with everything if you want to implement the damage system part as well (That's where the enemy blueprint came from) Check it out here ua-cam.com/video/o3uFXnNxwKE/v-deo.html
@@AliElZoheiry Amazing stuff, really appreciate the time and effort you put into this, thank you so much. Afraid I'm in the same boat as @tracken here. I went from your object pool tutorial to your damage tutorial, using the same project to do this tutorial and a few things were different for me. I also didn't have the target variable in player, I had to copy it from BP_Projectiles_Base, and a few other things like the collision fix was different from the previous video. Simple enough to fix as I could just copy the changes so no big deal. Anyway just a heads up as either we both missed the changes in the previous video or you possibly missed recording it.... Regardless great work and I'll be continuing with the series. For clarity, I started with the object pool video, moved onto the series and have been doing it all in the same project, how would I now implement the projectile pool? or should I go over that video again and make the changes from there. *** MAIN question I have, I noticed theres a collision sphere, is there a reason we using the box collision and not the sphere?*** Anyway thanks man!!! :)
Your stuff is impressively helpful for a beginner like me. I have completed the entire tutorial with full success except my particle system doesnt fly with the mesh. The mesh (I used a missile with a flame trail instead of an arrow, but same idea) tracks and flys, however the particle system disappears as soon as its spawned. When I place the actor in the world, the particle system is there, but the spawned actor doesnt have them. Any idea what Ive overlooked?
Glad you like it Zach. Not really sure why your particle effect would work when placed in the world but not when spawned. Unless it's very short and when spawned it plays and disappears very quickly. Or maybe for some reason "auto activate" isn't turned on, but i think that would affect it when placed in the world also. If you can't figure it out, feel free to join the Discord Server and ask in one of the help channels there
I'll do my part and go back to review it again with fresh eyes, but if it keeps outwitting me Ill be sure to do that. Thanks for the support! @@AliElZoheiry
Amazing video thank you so much, i have three problems: 1- Projectiles collide with each other. 2- Projectiles collide with self if i catch up to them (without damaging me which is good). 3- I did the same steps for the projectiles on the enemy so it fires these projectiles too and it works so i added a target which is my actor but it still goes in a straight line not to the location of my actor.
Hey there, glad you're finding this useful. For collisions, I recommend double checking the part where I add "Ignore actor when moving" function, because this is what handles collision. It can be a bit confusing so make sure to watch it carefully. Regarding going to the target: I suggest checking if the target is valid or not, and if it is valid, make sure that the velocity is recaluclated using that actors location. Add print statements to check these values
If anyone is having werid issues with collision set the collision container to be the root(drag it on top of the DefaultSceneRoot) otherwise collision events will be broken for everything but pawn collision.
I would really like a tutorial for a simple inventory, from which you can equip or unequip say melee weapons and armor instead of picking them up and attatching them to the mesh without any or much casting
Hi brother, Awesome tutorial! I wanted to ask that at @ 33:15 when you assign the actor in the spawn actor node, when i created a spawn actor node for my projectile shooter, it didnt came with speed gravity target is homing etc..Like what different have you done to set up that spawn actor and projectile shooter?
ok nvm i got it. Basically i ididnt setup the class for projectile types correctly. Instead of variable types actor it should be BP_Projectile_Base....
Great as usual! If i shoot many projectiles sometimes it seems like they hit each other. How to prevent this? Does it collide with trail or something? Anyone know?
Hey there, indeed the projectiles can collide with each other. If you want to prevent that, I recommend creating a new collision Object type and call it "Projectiles" then set your object type to that new type (in the base projectile class) and change the collision settings to have the base projectile "ignore" that new "projectiles" channel.
bro you continue to make magic attack system with its damage addition part too including vfx as no other video creator is on that and if you fill up that empty spot you will grow rapidly and be the person who helped many people complete their dream game. and btw you earned a too 😉
This is so helpful for my game and you are really good at making easy to understand tutorials with great pacing. I had one issue with one of the projectiles which seemed to collide with the camera boom(spring arm) but I made a custom collision channel that I called projectile, I then use that in my projectile base and I chose to ignore camera + projectile which seemed to have resolved the issue. If there is a better way to do it, please tell me!
Hey there, glad to hear you found the tutorial helpful! It's great that you were able to resolve the collision issue with the custom collision channel. Using the custom collision channel to ignore the camera and projectile sounds like a good solution. But a simpler one would be to ignore the "Camera" channel on the "Mesh" component in your Base projectile. That way you don't need custom channels
A lil nugget after hours of head scratching. using ue5.4 If you're trying to get the projectile to shoot where your camera is pointing (and if your player is using the cameras rotation, like skyrim third person view), this needs to go into the "spawn transform" socket of the SpawnActor BP_Projectile_ "Get Player Camera Manager" needs to be piped into "Get Actor Location" and "Get Actor Forward Vector", which both need to be piped into the target socket of "Find Look at Rotation" which needs to be piped into the rotation socket of "Make Transform" which needs to be piped into "Spawn Transform" "Get Actor Forward Vector" needs to be piped into a "multiply" (set to 10000) which needs to be piped into an "add" "Get Actor Location" needs to be piped into "add" and the "add" needs to be piped into the "Target" socket of "Find Look at Rotation" if you have a socket you wish you fire your projectile from (right-click add socket onto whatever bone you want, hand_l for instance), Pipe your "skeletal mesh component" into "Get socket location" for socket, or for just actor use actor etc. then pipe socket location return value into the location socket of "Make Transform." and add the socket name into "Get Socket Location" (nothing needs to be plugged into "In Socket Name"). Anyhow, that's what worked for me after a sleepless night, hope it helps
Hey! Sorry to hear you faced some issues, though these issues are our best path to learning. Glad you managed to solve it and thanks for sharing your experience 🙏
@@AliElZoheiry It was a learning experience indeed! I'm sure it won't be my only sleepless night on this dev journey. Tried to implement both the damage system and projectile into a third person template with GAS already setup (gameplay ability system). From what I can gather, the process is similar, but you put all the functionality in the respective GA_file's instead of the BP_Player. For instance "take damage" I believe needs to be a GameplayEffect within the GAS system. Much much to learn. Thanks for the great tutorial
I'm glad to hear that everything is working for you! Keep up the great work on your tutorials, and don't hesitate to reach out if you need any help on the next one!
@Ali so i haven't finished the video just yet but I was wondering if I wanted the child's to consist of 3 projectiles instead of one are we just duplicating them in the BP so we can see the min the viewport? or is there another setting? I haven't finished the vid so i'm sure you will get to it but your videos are amazing please keep it up. Whatever game you are making I will buy :)
Hey there. If you want to fire multiple projectiles, then I suggest having a single projectile first, then another actor that fires multiple of these single projectiles you made, that way you can customize how many to fire, and each one behaves as a single projectile on its own. Thank you for your support btw, I will definitely let you know when I release my game
thank you so much!!! I love how you explain everything as brief as possible to make it easier to understand I'm not a programmer but it gave me an idea how things work and the blueprints look so neat and understandable! subs!!!
You're very welcome! I used to teach programming to non programmers as a job before, so I really enjoy simplifying things and avoiding going into complex topics that aren’t needed at a certain stage, happy to see that it’s working for you
If you want to be able to have the projectile ignore some actors and not others, then it should be changed so that it "overlaps" with all channels instead of "block' and you have to change the collision handling from "On Hit" to "On Overlap" and then you can check if you're overlapping with a team mate, then dont so anything, but if you overlap with a foe, then do the damage and everything else. You can also achieve something similar with "Custom collision channels" but that will mean you need a custom channel for each team, so depends on what approach you prefer
Hey there! Thank you for the suggestion! I'll definitely add that to my list for future tutorials. Stay tuned for more content on widget functionality 🙏
Hey man, Amazing tutorial really helping me learn a lot about projectiles, cant wait to dive into your damage system. I'm just wondering how did you add variables to the spawn actor at location node in your demo projectile shooter?
Thanks Ryan, really happy you're finding this useful. To expose variables of an actor to the spawn node, go to that actor, click on the variable, and check the boxes that say "Expose on Spawn" and "Instance editable"
Had the same problem. I think it's because we are using ue5.4. I have fixed: So in the BP_Projectile_Base ue5.4 is generating a "DefaultSceneRoot" on the left side in the components section. By dragging the "BoxCollision" directly on the "DefaultSceneRoot" it disappears and everything is working.
Hi :D Fantastic tutorial, crazy how you reply to all of the comments one question: in the part "target locking on enemy," what should I do with the target variable inside BP_Player? Should I somehow migrate the target in BP_projectile_Base or make a new one?
Hey there! Thank you for the kind words, I really appreciate that you recognize the effort it takes to respond to everyone! In the "target locking on enemy" part. You just need to pass a reference to the actor that you want to lock on to. I called it "target" which is a bit confusing because every function already has a "target" which referrs to the actor you are calling the function from, so make sure not to mix those 2 up.
@@AliElZoheiry Thank you :D the targeting works now, but i encountered a new problem my firearrow is turning to the enemy, but my other two projectiles don't. They always face the direction player is facing. Could you also help with that plz?
Hi Ali, great content. I have a question. If I want to make the projectile disappear after a duration or lifespan, how do I do that? Is there a settings in the projectile component or I just need to make a float timer kinda. and how will I do it If i want to make the projectile move along the ground without it hitting the ground. Like a shockwave
Hey! Thank you for your question. If you want the entire actor to get destroyed after a certain amount of time, you can set the "Lifespan" variable that is native to any actor. This takes a float value in seconds, and automatically destroys the actor after that duration
Another well done tutorial, Explained everything, super easy to follow along with. I got everything working as intended. Only issue is when i "cast" the projectile when spawn actor is activated it moves my 3rd person camera for a split second to inside of the body almost. Would you know off hand what i missed or need to change to fix that im sure it something dumb. Ive removed all the code around it and narrowed it down to that node. Ive tried changing the spawn transform to a socket i made away from the chars body and it still happens. *Edit* Made a second projectile much smaller without a tail (fireball) and it doesn't cause the clipping, could it be something with how long the collision box is coming out of the model?
It sounds like you have collision with the camera enabled on the projectile. Go to the collision settings of your projectile and make sure the "Camera" channel is set to "Ignore"
Awesome vid. Keep it up!! Helped me a lot. On another note, does anyone know how to make an attack range for the attacks? If target is in range, then the attack can go to it, otherwise the attack can't be fired.
Glad it helped! And to answer your question, you can simply check the distance from your player to your target using the "Get Distance" node, and only fire the attack if that value is less than a specific number
Loving the tutorial!! Complete beginner and learning a ton. Any idea why my camera zooms way in when my skills go through me? I tried turning off camera collision on my mesh and didn't effect it.
I figured it out and figured I would reply incase someone has this issue. I turned off "Do Collision Test" on Camera Boom and it looks good. Not sure if that messes something else up down the road but I'll deal with it then :)
Hey there! Glad to hear you're loving the tutorial! and I'm glad you fixed the issue, I think you can also achieve the same by making the projectile ignore the "Camera" channel, that might be a better option than to disable all collision tests on the camera
Hey man! I've been following this and your combat system tutorial but when I change the order of rotate to target when target is valid etc at 32:39. It will go to the target but like at a weird angle. it doesnt seem to be rotating to target properly for me! but it only starts doing it at that step. Any suggestions on fixing this? Other than that Ive got it all down perfect :) amazing videos! EDIT: Just had to set "Rotation Follows Velocity" under my Projectile Base BP settings. So AMAZING Video 💪
Hey! I'm glad to hear you're following along with the tutorials 🙏Indeed the "Rotation Follows Velocity" is a must for this to work correctly. Thanks for the kind words! 💪
Hey! Yes, you can definitely swap out the particle system for Niagara in your BP projectile. Just make sure to replace the relevant references and settings accordingly. Hope that helps! 🙏
I would like to add a VFX before the effect where the projectile starts moving, but I'm not finding the right nodes to create it. Do you have a tutorial that explains this part? Example: a muzzle effect when firing a weapon.
The nodes are "Spawn system at location" if you are using Niagara vfx, or "Spawn particle at location" if you are using legacy particle system vfx. You can also "Spawn attached" (instead of at location) if you want them to be attached to another actor
Hey there! Glad you found the content helpful. To ignore collisions of the projectile, you can use collision channels to filter out which objects the projectiles should and should not collide with. If you need further details, feel free to ask!
This is an awesome tutorial! I wondered, would you by any chance be able to help me with allow the projectile to have a random curve when fired? Other than just homing, it would look cool if it shot out and up into the air (or down) randomly in an arc before heading to it's target.
Hey, really glad you found this useful. For arching projectiles, you'd have to either calculate the velocity needed to shoot the projectile in an arc, or use one of the built in arc functions such as "Suggest projectile custom arc" function which could help you with that.
Hi, I love the video but ever since Fab was Introduced to UE5 I am no longer able to open these Assets used in this tutorial, Paragon Gideonl & Infinity Blade Effects
Hey! I'm glad you enjoyed the video! Unfortunately the Paragon Gideon and infinity blade asset packs are no longer available on Fab :( I don't know why they decided to remove those, it's very sad
everything worked except for the right mouse button @ 44:12 . i dont remember setting up target variable. so i just made one and it has no options enabled because i cant see what you enabled and i cant find it in the last video. I just will use the normal right mouse action i learned from other vids
The target variable is just the result of the get actor of class, so this is not something we should have set before, it should be set at that timestamp. In the video I just realized that I had a variable called target already (from when I was testing off camera) but this was the right time to create this variable
@@adrianszromek3877 make sure the "target" variable in the variables list of the BP_projectile_base class, has "instance editable" and "expose on spawn" both set to true. (These are checkboxes that appear when you select the variable from the details panel)
Hey! The "ShootPoint" is usually a Scene Component that acts as a reference point to spawn projectiles. It helps with properly positioning the projectiles when they're fired😊
Another question :) How would i do so i can choose what animation each skill will have. Lets say its a HEAL i want a certain animation to accur etc. That would be nice to build up
Hey! Great question! To achieve that, you can create an animation variable or an array in your skill system that references the specific animation for each skill. Then, when a skill is triggered, just play the corresponding animation based on the action! 🙏
32:37 , I had to use "get player character" on the actor of "ignore Actor When Moving". Problem is now the enemy get hit by their own projectile, making a new one just seems to error the bind event to projectile impact, target output changes.
The idea is to have the capsule component ignore the projectile actor, and then have the box collision component of the projectile ignore the owning actor/instigator. You need both
Hi, thanks for another great video. Please tell me why my projectile flies to the side after adding the scene; when I select a target, everything is correct, but when I simply release the projectile using the left mouse button, it flies to the side and not where the hero is looking
Hey there, thank you for your kind words! It sounds like the issue might be related to the direction in which the projectile is being spawned. Double check the spawn and direction settings to ensure it aligns with the hero's view. Let me know if you need additional assistance!
Is it better to use this “projectile” system for gunfire, or a simple VFX and simulated hit calculations for efficiency? Because, wouldn’t all the calculations of actual “projectiles” be heavy on the memory especially if there’s lots of gunfire? Or is it the opposite, where having projectiles is better for memory usage..?
The answer to that question depends on the gameplay not really the efficiency, because you can make both systems as efficient (or not efficient) as you want. Take the game Overwatch for example. You have some guns that use line trace for bullets like soldier 76's machine gun, and some others use projectiles like Bastion's gun
Looks nice, but projectile actor dissapears along with niagara, it just pop out of the screen. How to fix that? For example for fireball it should leave a fire trail for a moment.
If you want the trail to remain, then either make the trail a separate actor attached to projectile, so that when the projectile is destroyed, the trail stays. Or, you can destroy only the projectile movement component and the projectile effect, but keep the trail, and only destroy the entire projectile actor later
Hi Ali, thank you for the fantastic tutorial. I have a question regarding the "BP_Projectile_Shoot" blueprint that you created at 29:46. I am confused about the blueprint's 'shootpoint'. Could you please provide more information about the content of the blueprint?
Thank you, glad you liked it 😊🙏 The "shootpoint" is simply a "scene" component, which is just an invisible component that can be used to store a location and/or rotation. Then I use the location and rotation of the scene component to know where to spawn the projectile from. So where this "Shootpoint" component is in my actor, thats where the projectile will spawn from, because I use the location of that component when spawning the projectile
@@AliElZoheiry interestingly I am having issues with collision when using the scene component - specifically with base projectile and dark energy one... if my Scene component is inside the bounds of my capsule (in Viewport) the camera zooms in for a split second when I fire the projectile... if I move it further out it doesnt... if i assign location to mesh it shoots from the feet but doesnt zoom anymore... the frost and fire arrow projectiles dont have this behavior... Scene comp ignoring some collision stuff? :P
FYI I found the solution 🤦♂ On my BP_Player Camera Boom, I somehow changed the Camera Collision > Probe Channel to 'World Static'... so once I changed it to 'Camera' my projectile no longer shifts the camera in specific circumstances lol >_>
Hey Ali, thanks again for a great tutorial. Quick Q - I cannot alter the speed of a projectile during run time with any variables we've set, nor directly adjusting the speed via the particle movement component. Any ideas how to get this going?
You're welcome, glad you liked it. To adjust the speed at runtime, you should directly modify the "Velocity" parameter on the Projectile movement component. Modifying the intial speed and max speed won't do anything because as soon as the projectile starts moving, it's the "Velocity" that is used to calculate direction and speed. Just a reminder that (velocity = direction * speed)
Hi thx for the tutorial it been very helpful starting out. But i've ran into a problem and dont actually have a clue how to solve it, when i spawn the projectile too fast while moving, they are colliding itself. is there any ways to make projectile ignore each other thx
you can make the projectiles ignore each other by adjusting the collision settings. Here's how you can achieve this: 1. Utilize collision channels to filter out which objects the projectiles should collide with and which they should ignore. 2. Assign a unique collision channel to the projectiles and configure them to ignore collisions with actors of the same channel. 3. By setting up the collision channels properly, you can ensure that the projectiles do not collide with each other even when spawned quickly.
As people said before, this knowledge is worth a lot, I have paid for courses that were not clear and as good as your videos! Thank you Also, is anything different with UE 5.3 that change the default settings of the projectile or the mesh? When I follow this steps in UE5.2 it all work, but in 5.3 it appear that it does not simulate the movement, only the gravity, I even tried in a new project, but can't put my head around what is causing the difference in behaviour
You're very welcome Angelo, and thank you for watching and for your support 🙏 I don't know of any update in 5.3 that would cause this issue, but I haven't used 5.3 myself yet. Glad to hear it's fixed by downgrading to 5.2 though
I'm having the same problem the projectiles doesn't spawn in the direction im looking but from my characters left side.. aslo i notice that som nodes was changed in the Projectile base BP, later in the video. Think it was spawn effect and sound.
hey, im using a top down shooter template- everything is working okay however whenever i shoot, the projectiles dont go forwards? they project from the side of the player. any idea whats causing this? thanks
It sounds like you have 2 different forward vectors, one for the character and one for the controller, and they don't always face the same direction, so make sure to use the correct forward vector when calculating the direction
The projectile system seemed to work fine when I was working on it inside it's own private project, but when I tried to import this into another project, I seem to have trouble getting the projectile to actually collide with the target. It seems to just go right through them and also seems to randomly push the target around. I am genuinely confused as to why this is happening. I've tried checking on my collision presets that are on the box collisions and meshes on the projectile and target. The projectiles do not have simulate physics on so they shouldn't have any mass, and yet they seem to push my targets around without really colliding into them somehow. For now, I'll see if I can just get it to work with overlap instead of block.
If you want your projectile to ignore certain actors, you have to put the "Ignore actors while moving" node on your other actor as well when you spawn the projectile. I also explain this in the tutorial
I meant that my target is not getting hit by the projectile. Genuinely confused as to why that was the case as I checked numerous times the collision settings on the mesh/capsule collision. Homing projectiles would just go right past my basic boss enemy, but weirdly at times it would seem to push the enemy around. I tested it on other enemies and it seemed to work fine. I'm guessing some setting might have changed at some point by a coworker, but I couldn't find the reason after spending too much time trying to debug. I managed to get it to work with overlap, so I've moved on as I'm trying to prioritize getting a prototype working first. Appreciate your reply and your tutorials have been extremely helpful! @@AliElZoheiry
Ive checked literally everything more then five times but can't seem to figure out why I keep receiving: Blueprint Runtime Error: "Accessed None trying to read property Target". Node: Set Velocity Graph: EventGraph Function: Execute Ubergraph BP Projectile Base Blueprint: BP_Projectile_Base My projectile wall is shooting the ice lances sideways instead of straight on, it worked before but somehow after a compile it stopped working and I just can't see what's wrong, what should I do?
Hey Nikoma, cant really tell what the issue is simply by the description, but it could be that you're not checking if the target is valid before setting the velocity of the projectile based on a target. If that's not the issue, feel free to join the Discord server and ask your question there with more details 🙏
@@hovonerthat projectile shooter is just a way to demo the projectile, you don't have to recreate it and it's not related to the ignore actor while moving, this should be done regardless
Hello! I am using your tutorial for my enemies to do damage to the character. I want the player to have an ability where they can block the projectiles to stop the damage. What is the best way to go about this? would I just make the sphere surrounding the character block all dynamic so it can never hit the player? thank you for the great tutorial
The way I did it as part of my Smart Enemy AI series, is that when I take damage, I then check if the character was blocking, if true, then i dont apply the damage and I play a block animation, if false, I proceed with applying damage normally
Starting at 36:00 I am wondering how I can toggle or select through different projectiles or go from a first projectile or second projectile as I press either 1 key or 2 key.
In the spawn actor from class node, you can make the projectile class a variable, then change the value of that variable when you press a key or do a certain action.
@@AliElZoheiry Hmmm that might be similar to how I did it using a selector node, but now I'm trying to make a shotgun projectile that shoots multiple at a time and I'm making a branch saying if 2 is pressed then it goes to the separate shotgun projectile spawn and when I do the for loop from that branch from true, the for loop isn't activating, or my collision is weird, but the shotgun projectile is indeed spawning, just not more that one at a time.
For anyone stuck at 12:33 who're using niagara instead of cascade, the node you want is called "spawn system at location" instead of "Spawn emitter at location"
Great addition, thank you 🙏
Thanks, you save me haha
THANK YOU!!!! Lol
Finally someone who seems to be teaching the propper way to do things. i would pay for a complete course from you
Thank you Mistah, I appreciate you 🙏 I really try my best to teach rather than just demonstrate. Let me know if you have any suggestions for a course you would be interested in
I second this! Def need a course :)
I probably would too, so far no troubles everything working great
Another home run, I am watching it right after the damage system video and I love how modular and expandable this projectile system is. Thank you for these tutorials you are the best Unreal teacher on UA-cam hands down.
Very happy to hear that, I really appreciate your support, thank you for that, and I'm glad you found it useful.
If you're like me. When you get everything to work and shoot the projectiles. If your camera zooms in with every attack. Go into your Projectile Base -> Box Collision -> under details collision -> Set Collision presets to custom -> and ignore the camera 💪🏻 Ali covers this in the very beginning of his A.I tutorial and this is another way to make sure your camera doesnt act up on you, if it ever does! :D
So again. If you have camera issues with things like characters and various other things. BoxCollision of BP_desired_choice -> Custom Presets of Collision in Details -> ignore camera = saves the day! Im still new and trying to help my fellow newbies if they come across similar hiccups 💪🏻
Thank you for sharing that helpful tip! I'm sure it will benefit other newcomers facing similar issues 🙏 Keep up the great work!
Thanks Chuck! This helped me
For others that might attach this to a real player character:
- To avoid the collision with self you also need to add "Ignore Actor When Moving" inside the Character Blueprint (or wherever you wire the attack). Otherwise it doesn't work properly. This is also stated in the comment of the method. In this case the target is the CapsuleComponent, and the actor is the return value of the "Spawn Actor Projectile" method call.
- If you have an impact particle / niagara that is flat (e.g. I have some kind of ring with fog from a laser - in isometric perspective) you want this particle to be oriented against the impact object's surface. You can achieve this the following way: From the "Break Hit Result" node you take the "Ïmpact Normal", then "Make Rot from XY" - X and Y Input is both times the "Impact Normal"-Vector Output of the Hit Result. Then the ring will be oriented with it's edge to the surface. The only thing to do left is: Break Rotator -> Add 90 to the Yaw (Z) Axis -> Make Rotator from original X and Y, and the addition result. Use this rotator as input to "Make Transform" -> "Spawn Actor Projectile". I don't know whether this is the best approach though - but it should work for all kind of flat designed projectiles where the particle's surface is perpendicular to the floor (meaning it has no rotation applied at all) - spherical projectiles will not be influenced.
- If you use a Paragon Character that has a Weapon included in it's mesh, there is always a specific socket called "Muzzle_01" or similar - you need to look this up in the Mesh. So to offset your projectile from exactly where the Weapon is, you can just use: Get Socket Location (Target = Get Mesh From Player Character, In Socket Name = Muzzle_01). You can use a variable here if you have multiple characters and so on. This is just to know how you can accomplish this. This needs to be used as the location Input for "Make Transform" -> "Spawn Actor Projectile". The socket location will always be according to the animation automatically - this is so cool :D!
- All of these points have led to a good result - but sometimes I can still outrun the a projectile and clash into it :D. I think for a real player character one should add the velocity of the current character to the velocity of the projectile - as it would be in the real physical world as well. This way one shouldn't be able to ever catch up to the projectile, and you have the real doppler effect when running forward / backward.
Awesome tips! Thank you for adding them 🙏
@@AliElZoheiry NP - Sorry the first point was actually covered in the end of the video. I was programming something else in the meanwhile and just finished to watch the video for the connection to the damage system. Time for the first trash mob :D. Short suggestion - that nearly no UA-camr does - for your Smart Enemy Playlists, and Playlists in General - always put a link to the playlist it is placed in into the description (link back) - because when I land on a random video and decide to watch a playlist from the beginning, I want to be able to go to the playlist directly. The Cherno (C++ Game Engine Dev - where I currently learn - does this too). I always wondered why no one on youtube is doing this...
Another added tip to the paragon character point, if the projectile is firing to only one location when you're not specifying a target, you can set rotation from the make transform to either mesh rotation or camera rotation, camera rotation made the projectile getting fired to where you look :D
When I put the ignore actor it ignores my player but it also is not effected by any other object so it won’t be destroyed. Do you know what the problem might be
@@mattcain4374 Sorry don’t know. It’s been a while. Maibe Ali knows.
I didnt expect this tutorial to be so thorough, much more informative and well explained than probably every other video Ive seen on this subject
Wow, I appreciate you saying that, I indeed try to focus on proper architecture and in depth explanations. So I'm happy you see the value in that
Really excellent. You have a great pace. You're covering a lot of great content quickly and concisely while at the same time carefully narrating and explaining everything you are doing. That's a very rare ballance. I've subscribed.
Thank you for your kind words Sean, I'm glad that you find this content useful and I hope all future content is up to the standard ;)
Agreed, subscribed as well. Hope you can continue doing tutorials like this. I really liked that you mentioned the current best practice for VFX. I want to learn what to do to optimize a game before doing a lot of counter productive things if I were to make a very graphically demanding game. I feel like it’s the perfect time to start game dev now (UE 5.3) with all the nanite capabilities that just came out.
I frickin love this man. I have been in tutorial hell for the past 2 months, trying to learn as much as I can with UE5. There is a huge trend of tutorials not really explaining why they do things and rather, just show you how to achieve it... so I never really learn. Your vids are genuinely the first time I can follow along, learn, and get the result.
It would be amazing to see your take on how to do a climb system in ue5 (most climb systems are old and outdated). But anyways, Thanks for all these amazing tutorials!
I plan on watching all of these vids to get some ideas for my first project. (Also, congrats on 10k subs!)
Hey, I'm really glad you think so. This is exactly what I'm going for. Teaching, rather than just showing how to do something, so I'm happy you see the value in that.
Thank you for the suggestion for the next tutorial I'll definitely consider it
for someone who has learnt unity and has been a professional for 4 years, Your content seems like the best to get started from!(after watching some beginner stuff from unreal sensei)
Thank you for your kind words! I'm glad to hear that my content is helpful for transitioning from Unity to Unreal Engine. Keep exploring and creating! 🎮
Such an amazing tutorial. Hands down the best I've watched. You're not only covering inheritance / dispatchers / interfaces but also showing us how to utilize them.
I'd be interested in a course about weapon selection system where you can switch over different weapons.
You're very welcome! Thank you for your kind words and your suggestion. I'll definitely consider creating a tutorial series on weapon selection systems in the future. Thank you for watching and commenting 🙏
If anyone is wondering. The set velocity in the RotateToTarget event is an kind of an "auto aim" from the instant you spawn the projectile after setting a target, the homing part in constructon script does the homing part in the sense that you can shoot the projectile in any direction before it homes in on the target. At least that is how it seems to me after testing the script. Cheers to Ali for good content!
Thanks for the insight! Glad to hear this is working well for you, and I'm thrilled that you're finding the content helpful! 🙌
That was fantastic. Looking forward to more lectures. Personally, I am interested in learning how to create In-game shop&Sell like in JRPGs.
Thank you! Glad you liked it, if i make a series it'll definitely be an RPG series and will include things like NPC vendors, but I haven't planned that yet
Amazing tutorial with amazing use of OOP principles
Thank you so much for the kind words! I'm glad you found the tutorial helpful and enjoyed the use of OOP principles.
All your tutorials are amazing! Please don't stop making content.
Thank you! I'll definitely keep making more 🙏😊
Halfway through. This information is sticking cause I debugged some errors I made in the last video on my own. Very helpful! I got two simple modes to make after I get through a few more of your videos. Thanks!
I'm very happy to hear that ☺️ glad you found this useful 🙏
Just wanna say ty for your content. Studied a lot of Tutorials/Courses the last weeks. The way you teach is 10/10. TY !
I really appreciate your comment 🙏 very kind of you to say that. I'm glad it was helpful
Lifesaver! I'm working on a game as a new indie dev and I have virtually no exp coding and I'm already a big chunk of the way to making it happen
That's fantastic to hear! I'm so glad the content has been helpful for you as you work on your game. Good luck with the rest of your development journey! 🚀
Best Unreal tutorial i've seen so far, tysm for the content!
Thank you Raghtshade, I appreciate you 🙏
First off, great tutorial. This added a lot of clarity for me. I'm trying to figure out a way to have this work on multiple targets. It seems that when this locks onto a single target it has trouble with proximity to other enemies. But for single target this is great!
Thank you Tino 🙏 do you mean you want to lock on to a single target and have the projectile ignore other enemies?
@@AliElZoheiry you’re welcome. And pretty much exactly that. I ended up disabling the homing and attaching the spawn to a camera boom. I have a lock on camera system so now any direction the camera “player” is looking I can hit enemies, above,below, etc. I appreciate you this definitely helped me in my indie game!
@@TinoPlusUltra I cant get this to work, what did you connect to the spawn transform to get this to work properly?
@@TabrissJustice are you finding a spot for the projectile to spawn?
@@TinoPlusUltra Yea, I get it to spawn when i want it to, but it only goes horizontal...
Your Tutorials are the best. More people should watch it.
Thank you so much for the kind words! I really appreciate your support and I'm glad you're finding the tutorials helpful.
If you're at 26:13 and your ice projectile is not rotating to the direction its being fired, go to your world viewport, click your ice projectile, click ProjectileMovement system under it, and check "Rotation follows velocity."
I'm trash with UE5 but had to find that one out myself and feel accomplished. Maybe it helps someone.
Jk, dont do that in the world viewport. That will only fix it for the individual systems you've spawned in. Do it in your ProjectileBase viewport
Indeed, make sure your mesh is facing the movement direction of your projectile, but rotate it in the projectile class itself and not in the level
It helped me! Thanks!
Paused this video to take a detour down the road of creating Niagara effects and I’m so glad I did. 😂 I’m all set to make spells for my game now
That's awesome to hear! Glad you found the detour worthwhile 😄 Good luck with your spell creation!
this tutorial solved my all problem thans for such a indepth tutorial about projectile
You're very welcome! I'm glad it helped you solve your problems. Thank you for watching and commenting 🙏
i know that this message won t be read, bu you just saved my life with this tuto
Hey there! I actually read and respond to all comments! So I'm really glad to hear this has helped you. Thank you for watching 😉
I didn't know projectile movement component works like that, thank you
You're very welcome! Glad you found that tip helpful!
ilove your tutorials .. they are really well structured, one learns new skills ^^ keep up the great work
Glad you find them useful. Thank you for the support 🙏 I appreciate you
Another fantastic tutorial , i'm seriously so glad i found out about you man you are helping me so much.
You're very welcome! I'm really glad to hear that my tutorials are helping you. Thank you for your kind words and for watching 🙏
Thank you sooo much man i just started learning this engine and this is exactly what i wanted to do. (With some changes of course). God i love this video ❤❤
You're very welcome! I'm glad to hear that it was exactly what you were looking for. Good luck with your learning, and feel free to make it your own! Thanks for watching and commenting 🙏❤️
Really amazing content! This has helped me become much more fluent with UE5
Thank you so much for your kind words! I'm thrilled to hear that my content has been helpful to you in becoming more fluent with UE5 🙏
Perfect Video - Exactly what I was looking for. I really like that you come from a Software Engineering Background (like me). I was already asking myself how I should structure certain things - as the engine and the huge API is quite overwhelming in the beginning. Glad to have found this in your videos (many do not incorporate this). What also really helps is that you seem to use exactly the intended API functions for their correct purpose - this is also something I was not seeing that often on youtube - same time asking myself whether a certain approach is the right one (some people compute super complex vector math although there is an abstraction or higher level API in the engine). Anyway - I already subscribed and will watch the whole enemy AI series and all other videos for sure. Thank you for the good work!
Hey Genonaut, thank you so much for your kind words and appreciation. I was reading this comment with a smile on my fave because I was trying to achieve exactly what you mentioned, and help give clarity on exactly those issues you were facing. So I'm very glad that this was helpful for you and I appreciate your support 🙏
@@AliElZoheiry 👊
My friend Believe me you again saves my life. Thank You So Much
Happy to help Roy. Glad you enjoyed it, and thank you for the support as always ;)
@@AliElZoheiry I am really so gladly meeting you! Please believe me your lessons very helpful me already.
Thank you so much
@@AliElZoheiry I wish all the best! You amazing person and devoloper.
Good video, but the zoom in portion when you're clicking seems to cut off portions of where you click and it misses. Because you don't state the full command, it's sometimes harder to follow along. If can prevent a super zoom, it would be pretty helpful :)
Thank you for the advice, I tried to improve that in later videos, please let me know if it's still hard to follow, I'm always trying to improve
Idea : Make an inventory system for your character. And when enemy dies they drop random things that you can take and hold it in your inventory.
Thank you for the suggestion, I'll add it to my list 🙏
Amazing tutorial, thanks you so much!
Thank you minhdoan 🙏 Glad you enjoyed it
This was a great utorial on projectiles. I will be keeping an eye out for your content.
Thank you! Really glad you liked it, and thank you for watching ;)
Love the videos. There does tend to be a problem in this video in the last 10-15 minutes where certain blueprint nodes (like the projectile targeting stuff) is clearly made off of the recording or edited out and the audience has to guess at what you're doing. One example is the target variable was made in the enemy blueprint, but it was not accessible in the player blueprint so I had to assume it was the same one (you just drag and drop it so clearly it was made off-screen). The other instance of this is the not exploding on the player. This was also made but not recorded.
Other than that great video, excellent quality, and great content. Following along is easy and the video is quite well made overall. I'm enjoying following your videos and adding them to my own game portfolio
Hey, I'm glad to hear you're enjoying the content and finding it helpful. I understand the confusion, but nothing was done off camera really, I just migrated the entire projectile project into my other damage system project which I have a full tutorial on as well, so you can follow along with everything if you want to implement the damage system part as well (That's where the enemy blueprint came from)
Check it out here ua-cam.com/video/o3uFXnNxwKE/v-deo.html
@@AliElZoheiry Amazing stuff, really appreciate the time and effort you put into this, thank you so much.
Afraid I'm in the same boat as @tracken here. I went from your object pool tutorial to your damage tutorial, using the same project to do this tutorial and a few things were different for me. I also didn't have the target variable in player, I had to copy it from BP_Projectiles_Base, and a few other things like the collision fix was different from the previous video. Simple enough to fix as I could just copy the changes so no big deal. Anyway just a heads up as either we both missed the changes in the previous video or you possibly missed recording it.... Regardless great work and I'll be continuing with the series.
For clarity, I started with the object pool video, moved onto the series and have been doing it all in the same project, how would I now implement the projectile pool? or should I go over that video again and make the changes from there.
*** MAIN question I have, I noticed theres a collision sphere, is there a reason we using the box collision and not the sphere?***
Anyway thanks man!!! :)
Ali, these videos are really helpful! Keep up the good work!
Thank you so much for your support! I'm really glad to hear that you're finding the videos helpful. I'll definitely keep them coming.
Your stuff is impressively helpful for a beginner like me. I have completed the entire tutorial with full success except my particle system doesnt fly with the mesh. The mesh (I used a missile with a flame trail instead of an arrow, but same idea) tracks and flys, however the particle system disappears as soon as its spawned. When I place the actor in the world, the particle system is there, but the spawned actor doesnt have them. Any idea what Ive overlooked?
Glad you like it Zach.
Not really sure why your particle effect would work when placed in the world but not when spawned. Unless it's very short and when spawned it plays and disappears very quickly. Or maybe for some reason "auto activate" isn't turned on, but i think that would affect it when placed in the world also.
If you can't figure it out, feel free to join the Discord Server and ask in one of the help channels there
I'll do my part and go back to review it again with fresh eyes, but if it keeps outwitting me Ill be sure to do that. Thanks for the support! @@AliElZoheiry
Amazing video thank you so much, i have three problems:
1- Projectiles collide with each other.
2- Projectiles collide with self if i catch up to them (without damaging me which is good).
3- I did the same steps for the projectiles on the enemy so it fires these projectiles too and it works so i added a target which is my actor but it still goes in a straight line not to the location of my actor.
Hey there, glad you're finding this useful. For collisions, I recommend double checking the part where I add "Ignore actor when moving" function, because this is what handles collision. It can be a bit confusing so make sure to watch it carefully.
Regarding going to the target: I suggest checking if the target is valid or not, and if it is valid, make sure that the velocity is recaluclated using that actors location. Add print statements to check these values
Fantastic tutorials!
I appreciate it very much!
Keep doing sir!
Thank you for your kind words! I'm thrilled to hear that you appreciate the tutorials. I will definitely keep them coming! 🙏
If anyone is having werid issues with collision set the collision container to be the root(drag it on top of the DefaultSceneRoot) otherwise collision events will be broken for everything but pawn collision.
I personally didn't have that issue. Although it is recommended by unreal to make the collision as the root component for moving projectiles
wonderful teaching you are great
Thank you for your kind words! I'm glad you found the teaching helpful 🙏
I would really like a tutorial for a simple inventory, from which you can equip or unequip say melee weapons and armor instead of picking them up and attatching them to the mesh without any or much casting
Hey there! Thank you for your suggestion, I appreciate it! I'll add this to my list of ideas and keep it in mind for future videos. Stay tuned 🛡️
Hi brother, Awesome tutorial! I wanted to ask that at @ 33:15 when you assign the actor in the spawn actor node, when i created a spawn actor node for my projectile shooter, it didnt came with speed gravity target is homing etc..Like what different have you done to set up that spawn actor and projectile shooter?
ok nvm i got it. Basically i ididnt setup the class for projectile types correctly. Instead of variable types actor it should be BP_Projectile_Base....
Hey! Thanks for your comment! Glad you fixed the issue 💪
Great as usual! If i shoot many projectiles sometimes it seems like they hit each other. How to prevent this? Does it collide with trail or something? Anyone know?
Hey there, indeed the projectiles can collide with each other. If you want to prevent that, I recommend creating a new collision Object type and call it "Projectiles" then set your object type to that new type (in the base projectile class) and change the collision settings to have the base projectile "ignore" that new "projectiles" channel.
Thanks for sharing your knowledge, this helped me a lot!
You're very welcome, happy to hear it was helpful 🙏
Another amazing tut. Thank you so much!
You're very welcome! I'm glad you enjoyed it 😊
Great stuff man, extremely helpful
You're very welcome! Glad you found it helpful 🙏
bro you continue to make magic attack system with its damage addition part too including vfx as no other video creator is on that and if you fill up that empty spot you will grow rapidly and be the person who helped many people complete their dream game. and btw you earned a too 😉
Thank you so much for the feedback. That really sounds like an interesting area to focus on, I'll definitely consider it and start planning 🙏
This is so helpful for my game and you are really good at making easy to understand tutorials with great pacing. I had one issue with one of the projectiles which seemed to collide with the camera boom(spring arm) but I made a custom collision channel that I called projectile, I then use that in my projectile base and I chose to ignore camera + projectile which seemed to have resolved the issue. If there is a better way to do it, please tell me!
Hey there, glad to hear you found the tutorial helpful! It's great that you were able to resolve the collision issue with the custom collision channel. Using the custom collision channel to ignore the camera and projectile sounds like a good solution. But a simpler one would be to ignore the "Camera" channel on the "Mesh" component in your Base projectile. That way you don't need custom channels
Love the content. The projectiles look great
Thank you 🙏
A lil nugget after hours of head scratching. using ue5.4
If you're trying to get the projectile to shoot where your camera is pointing (and if your player is using the cameras rotation, like skyrim third person view), this needs to go into the "spawn transform" socket of the SpawnActor BP_Projectile_
"Get Player Camera Manager" needs to be piped into "Get Actor Location" and "Get Actor Forward Vector", which both need to be piped into the target socket of "Find Look at Rotation" which needs to be piped into the rotation socket of "Make Transform" which needs to be piped into "Spawn Transform"
"Get Actor Forward Vector" needs to be piped into a "multiply" (set to 10000) which needs to be piped into an "add"
"Get Actor Location" needs to be piped into "add" and the "add" needs to be piped into the "Target" socket of "Find Look at Rotation"
if you have a socket you wish you fire your projectile from (right-click add socket onto whatever bone you want, hand_l for instance),
Pipe your "skeletal mesh component" into "Get socket location" for socket, or for just actor use actor etc. then pipe socket location return value into the location socket of "Make Transform." and add the socket name into "Get Socket Location" (nothing needs to be plugged into "In Socket Name").
Anyhow, that's what worked for me after a sleepless night, hope it helps
Hey! Sorry to hear you faced some issues, though these issues are our best path to learning. Glad you managed to solve it and thanks for sharing your experience 🙏
@@AliElZoheiry It was a learning experience indeed! I'm sure it won't be my only sleepless night on this dev journey.
Tried to implement both the damage system and projectile into a third person template with GAS already setup (gameplay ability system).
From what I can gather, the process is similar, but you put all the functionality in the respective GA_file's instead of the BP_Player. For instance "take damage" I believe needs to be a GameplayEffect within the GAS system.
Much much to learn. Thanks for the great tutorial
@@recrudescenostalgia6215 Normally I don't use the comments but thank you so much man.
This is just great! Second Tutorial done, everything works. Thanks a lot!
>>> On To The Next One!
I'm glad to hear that everything is working for you! Keep up the great work on your tutorials, and don't hesitate to reach out if you need any help on the next one!
@Ali so i haven't finished the video just yet but I was wondering if I wanted the child's to consist of 3 projectiles instead of one are we just duplicating them in the BP so we can see the min the viewport? or is there another setting? I haven't finished the vid so i'm sure you will get to it but your videos are amazing please keep it up. Whatever game you are making I will buy :)
Hey there. If you want to fire multiple projectiles, then I suggest having a single projectile first, then another actor that fires multiple of these single projectiles you made, that way you can customize how many to fire, and each one behaves as a single projectile on its own.
Thank you for your support btw, I will definitely let you know when I release my game
Very good tutorial. But the Project Isle kills me 🤣
Hahaha, it'll grow on you ;)
thank you so much!!! I love how you explain everything as brief as possible to make it easier to understand I'm not a programmer but it gave me an idea how things work and the blueprints look so neat and understandable! subs!!!
You're very welcome! I used to teach programming to non programmers as a job before, so I really enjoy simplifying things and avoiding going into complex topics that aren’t needed at a certain stage, happy to see that it’s working for you
how would I go about it in a way such that the projectile goes through all friendly npcs and only hitting the ones which can be damaged?
If you want to be able to have the projectile ignore some actors and not others, then it should be changed so that it "overlaps" with all channels instead of "block' and you have to change the collision handling from "On Hit" to "On Overlap" and then you can check if you're overlapping with a team mate, then dont so anything, but if you overlap with a foe, then do the damage and everything else. You can also achieve something similar with "Custom collision channels" but that will mean you need a custom channel for each team, so depends on what approach you prefer
@@AliElZoheiry Thanks, it worked!
Awesome! Glad it worked 🙏@@dynamicplayz1897
Epic tutorial. You are my hero.
Thank you! Glad you liked it, hope you enjoy the rest ;)
Would love a tutorial for widgets where you can choose an option to for example modify stats of your projectiles
Hey there! Thank you for the suggestion! I'll definitely add that to my list for future tutorials. Stay tuned for more content on widget functionality 🙏
awesome tutorial man
You're welcome! Glad you found it useful 🙏
Hey man, Amazing tutorial really helping me learn a lot about projectiles, cant wait to dive into your damage system. I'm just wondering how did you add variables to the spawn actor at location node in your demo projectile shooter?
Thanks Ryan, really happy you're finding this useful.
To expose variables of an actor to the spawn node, go to that actor, click on the variable, and check the boxes that say "Expose on Spawn" and "Instance editable"
@@AliElZoheiry Thanks man! cant wait to check out more videos!
Excellent work!
Thank you so much! I'm glad you found it helpful!
I did collisions exactly the same as you, but my actor still goes directly through any obstacles.
Had the same problem. I think it's because we are using ue5.4. I have fixed: So in the BP_Projectile_Base ue5.4 is generating a "DefaultSceneRoot" on the left side in the components section. By dragging the "BoxCollision" directly on the "DefaultSceneRoot" it disappears and everything is working.
@@abbignale6309 huge thanks, worked for me
Nice! I love to see the community helping out each other 🙏
Awesome thanks again! 😀
You're welcome! I'm glad you found it helpful! 😊
Noice! Lots of ideas to execute on!
Glad it was helpful 🙏
Amazing good tutorial ! You are Awesome thank you !!!!
Thank you! I'm glad you enjoyed it
Finally UA-cam recomended something good. Subscribe and like
I really appreciate it, thank you 🙏
Hi :D
Fantastic tutorial, crazy how you reply to all of the comments
one question: in the part "target locking on enemy," what should I do with the target variable inside BP_Player? Should I somehow migrate the target in BP_projectile_Base or make a new one?
Hey there! Thank you for the kind words, I really appreciate that you recognize the effort it takes to respond to everyone! In the "target locking on enemy" part. You just need to pass a reference to the actor that you want to lock on to. I called it "target" which is a bit confusing because every function already has a "target" which referrs to the actor you are calling the function from, so make sure not to mix those 2 up.
@@AliElZoheiry Thank you :D the targeting works now, but i encountered a new problem
my firearrow is turning to the enemy, but my other two projectiles don't. They always face the direction player is facing. Could you also help with that plz?
Hi Ali, great content. I have a question. If I want to make the projectile disappear after a duration or lifespan, how do I do that? Is there a settings in the projectile component or I just need to make a float timer kinda. and how will I do it If i want to make the projectile move along the ground without it hitting the ground. Like a shockwave
Hey! Thank you for your question. If you want the entire actor to get destroyed after a certain amount of time, you can set the "Lifespan" variable that is native to any actor. This takes a float value in seconds, and automatically destroys the actor after that duration
Another well done tutorial, Explained everything, super easy to follow along with. I got everything working as intended.
Only issue is when i "cast" the projectile when spawn actor is activated it moves my 3rd person camera for a split second to inside of the body almost. Would you know off hand what i missed or need to change to fix that im sure it something dumb. Ive removed all the code around it and narrowed it down to that node. Ive tried changing the spawn transform to a socket i made away from the chars body and it still happens.
*Edit* Made a second projectile much smaller without a tail (fireball) and it doesn't cause the clipping, could it be something with how long the collision box is coming out of the model?
It sounds like you have collision with the camera enabled on the projectile. Go to the collision settings of your projectile and make sure the "Camera" channel is set to "Ignore"
can you make a tutorial on aiming the projectile with the mouse
I will definitely consider it and see if there's enough interest
+
Thank you for the tutorial 😊.
Thank you for watching, hope you found it useful
Awesome vid. Keep it up!! Helped me a lot.
On another note, does anyone know how to make an attack range for the attacks? If target is in range, then the attack can go to it, otherwise the attack can't be fired.
Glad it helped! And to answer your question, you can simply check the distance from your player to your target using the "Get Distance" node, and only fire the attack if that value is less than a specific number
Loving the tutorial!! Complete beginner and learning a ton. Any idea why my camera zooms way in when my skills go through me? I tried turning off camera collision on my mesh and didn't effect it.
I figured it out and figured I would reply incase someone has this issue. I turned off "Do Collision Test" on Camera Boom and it looks good. Not sure if that messes something else up down the road but I'll deal with it then :)
Hey there! Glad to hear you're loving the tutorial! and I'm glad you fixed the issue, I think you can also achieve the same by making the projectile ignore the "Camera" channel, that might be a better option than to disable all collision tests on the camera
@@AliElZoheiry You are awesome!!
Hey man! I've been following this and your combat system tutorial but when I change the order of rotate to target when target is valid etc at 32:39. It will go to the target but like at a weird angle. it doesnt seem to be rotating to target properly for me! but it only starts doing it at that step. Any suggestions on fixing this? Other than that Ive got it all down perfect :) amazing videos! EDIT:
Just had to set "Rotation Follows Velocity" under my Projectile Base BP settings. So AMAZING Video
💪
Hey! I'm glad to hear you're following along with the tutorials 🙏Indeed the "Rotation Follows Velocity" is a must for this to work correctly. Thanks for the kind words! 💪
Hey brother can I exchange particle system to niagra ? On bp projectile dark energy?.
Hey! Yes, you can definitely swap out the particle system for Niagara in your BP projectile. Just make sure to replace the relevant references and settings accordingly. Hope that helps! 🙏
@@AliElZoheiry thanks I’ll try now
@@warsarebeautiful3504 don't forget to replace the "spawn emitter" with "spawn system" for Niagara effects
@@AliElZoheiry thanks I will
I would like to add a VFX before the effect where the projectile starts moving, but I'm not finding the right nodes to create it. Do you have a tutorial that explains this part?
Example: a muzzle effect when firing a weapon.
The nodes are "Spawn system at location" if you are using Niagara vfx, or "Spawn particle at location" if you are using legacy particle system vfx. You can also "Spawn attached" (instead of at location) if you want them to be attached to another actor
Thank you!
How to ignore collisions of projectile? It destroys each other if click fast
Hey there! Glad you found the content helpful. To ignore collisions of the projectile, you can use collision channels to filter out which objects the projectiles should and should not collide with. If you need further details, feel free to ask!
This is an awesome tutorial! I wondered, would you by any chance be able to help me with allow the projectile to have a random curve when fired? Other than just homing, it would look cool if it shot out and up into the air (or down) randomly in an arc before heading to it's target.
Hey, really glad you found this useful.
For arching projectiles, you'd have to either calculate the velocity needed to shoot the projectile in an arc, or use one of the built in arc functions such as "Suggest projectile custom arc" function which could help you with that.
Hi, I love the video but ever since Fab was Introduced to UE5 I am no longer able to open these Assets used in this tutorial, Paragon Gideonl & Infinity Blade Effects
same here.
Hey! I'm glad you enjoyed the video! Unfortunately the Paragon Gideon and infinity blade asset packs are no longer available on Fab :( I don't know why they decided to remove those, it's very sad
everything worked except for the right mouse button @ 44:12 . i dont remember setting up target variable. so i just made one and it has no options enabled because i cant see what you enabled and i cant find it in the last video. I just will use the normal right mouse action i learned from other vids
The target variable is just the result of the get actor of class, so this is not something we should have set before, it should be set at that timestamp. In the video I just realized that I had a variable called target already (from when I was testing off camera) but this was the right time to create this variable
Hi, great tutorial! But at 29:49, under speed and gravity, I don’t have the "target" option. Do you know how to fix this?
@@adrianszromek3877 make sure the "target" variable in the variables list of the BP_projectile_base class, has "instance editable" and "expose on spawn" both set to true. (These are checkboxes that appear when you select the variable from the details panel)
@@AliElZoheiry It worked, thank you
HI. In the ProjectileShooter there is a component underneath the mesh called "ShootPoint". What type of component is that?
Hey! The "ShootPoint" is usually a Scene Component that acts as a reference point to spawn projectiles. It helps with properly positioning the projectiles when they're fired😊
Another question :) How would i do so i can choose what animation each skill will have. Lets say its a HEAL i want a certain animation to accur etc. That would be nice to build up
Hey! Great question! To achieve that, you can create an animation variable or an array in your skill system that references the specific animation for each skill. Then, when a skill is triggered, just play the corresponding animation based on the action! 🙏
32:37 , I had to use "get player character" on the actor of "ignore Actor When Moving". Problem is now the enemy get hit by their own projectile, making a new one just seems to error the bind event to projectile impact, target output changes.
The idea is to have the capsule component ignore the projectile actor, and then have the box collision component of the projectile ignore the owning actor/instigator. You need both
Hi, thanks for another great video. Please tell me why my projectile flies to the side after adding the scene; when I select a target, everything is correct, but when I simply release the projectile using the left mouse button, it flies to the side and not where the hero is looking
Hey there, thank you for your kind words! It sounds like the issue might be related to the direction in which the projectile is being spawned. Double check the spawn and direction settings to ensure it aligns with the hero's view. Let me know if you need additional assistance!
Did you ever figure this out? I am having the same issue.
@@autodidactgarage Yes, I don’t even remember much anymore. It seems that where the projectile has spawn, the location needs to be changed
Think this happends couse Ali:s scene object is rotated 90 degrees. just rotate that one
Is it better to use this “projectile” system for gunfire, or a simple VFX and simulated hit calculations for efficiency? Because, wouldn’t all the calculations of actual “projectiles” be heavy on the memory especially if there’s lots of gunfire? Or is it the opposite, where having projectiles is better for memory usage..?
The answer to that question depends on the gameplay not really the efficiency, because you can make both systems as efficient (or not efficient) as you want.
Take the game Overwatch for example. You have some guns that use line trace for bullets like soldier 76's machine gun, and some others use projectiles like Bastion's gun
you're great man
Thank you 🙏 glad you found this useful
Looks nice, but projectile actor dissapears along with niagara, it just pop out of the screen. How to fix that? For example for fireball it should leave a fire trail for a moment.
If you want the trail to remain, then either make the trail a separate actor attached to projectile, so that when the projectile is destroyed, the trail stays. Or, you can destroy only the projectile movement component and the projectile effect, but keep the trail, and only destroy the entire projectile actor later
Make sure your colliders are at root otherwise collision may not happen
Glad you found this helpful! And good tip on the root colliders. Thank you for your input 🙌
Hi Ali, thank you for the fantastic tutorial. I have a question regarding the "BP_Projectile_Shoot" blueprint that you created at 29:46. I am confused about the blueprint's 'shootpoint'. Could you please provide more information about the content of the blueprint?
Thank you, glad you liked it 😊🙏
The "shootpoint" is simply a "scene" component, which is just an invisible component that can be used to store a location and/or rotation. Then I use the location and rotation of the scene component to know where to spawn the projectile from. So where this "Shootpoint" component is in my actor, thats where the projectile will spawn from, because I use the location of that component when spawning the projectile
Thanks for your reply 😊, and your amazing tutorial means a lot for UE5 environment 🙌.@@AliElZoheiry
@@AliElZoheiry interestingly I am having issues with collision when using the scene component - specifically with base projectile and dark energy one... if my Scene component is inside the bounds of my capsule (in Viewport) the camera zooms in for a split second when I fire the projectile... if I move it further out it doesnt... if i assign location to mesh it shoots from the feet but doesnt zoom anymore... the frost and fire arrow projectiles dont have this behavior... Scene comp ignoring some collision stuff? :P
FYI I found the solution 🤦♂ On my BP_Player Camera Boom, I somehow changed the Camera Collision > Probe Channel to 'World Static'... so once I changed it to 'Camera' my projectile no longer shifts the camera in specific circumstances lol >_>
Mine is doing the same thing, but the camera collision is set to "camera". Exact issue though.
Hey Ali, thanks again for a great tutorial. Quick Q - I cannot alter the speed of a projectile during run time with any variables we've set, nor directly adjusting the speed via the particle movement component. Any ideas how to get this going?
You're welcome, glad you liked it.
To adjust the speed at runtime, you should directly modify the "Velocity" parameter on the Projectile movement component. Modifying the intial speed and max speed won't do anything because as soon as the projectile starts moving, it's the "Velocity" that is used to calculate direction and speed.
Just a reminder that (velocity = direction * speed)
Hi thx for the tutorial it been very helpful starting out. But i've ran into a problem and dont actually have a clue how to solve it, when i spawn the projectile too fast while moving, they are colliding itself. is there any ways to make projectile ignore each other thx
you can make the projectiles ignore each other by adjusting the collision settings. Here's how you can achieve this:
1. Utilize collision channels to filter out which objects the projectiles should collide with and which they should ignore.
2. Assign a unique collision channel to the projectiles and configure them to ignore collisions with actors of the same channel.
3. By setting up the collision channels properly, you can ensure that the projectiles do not collide with each other even when spawned quickly.
As people said before, this knowledge is worth a lot, I have paid for courses that were not clear and as good as your videos! Thank you
Also, is anything different with UE 5.3 that change the default settings of the projectile or the mesh? When I follow this steps in UE5.2 it all work, but in 5.3 it appear that it does not simulate the movement, only the gravity, I even tried in a new project, but can't put my head around what is causing the difference in behaviour
I just created the BP in UE5.2 and imported in 5.3 and it worked 😅
You're very welcome Angelo, and thank you for watching and for your support 🙏
I don't know of any update in 5.3 that would cause this issue, but I haven't used 5.3 myself yet.
Glad to hear it's fixed by downgrading to 5.2 though
I'm having the same problem the projectiles doesn't spawn in the direction im looking but from my characters left side.. aslo i notice that som nodes was changed in the Projectile base BP, later in the video. Think it was spawn effect and sound.
Nvm just edited the rotation of the scene for casting in the right direction. I'm such a noob :D
hey, im using a top down shooter template- everything is working okay however whenever i shoot, the projectiles dont go forwards? they project from the side of the player. any idea whats causing this? thanks
It sounds like you have 2 different forward vectors, one for the character and one for the controller, and they don't always face the same direction, so make sure to use the correct forward vector when calculating the direction
The projectile system seemed to work fine when I was working on it inside it's own private project, but when I tried to import this into another project, I seem to have trouble getting the projectile to actually collide with the target. It seems to just go right through them and also seems to randomly push the target around. I am genuinely confused as to why this is happening. I've tried checking on my collision presets that are on the box collisions and meshes on the projectile and target. The projectiles do not have simulate physics on so they shouldn't have any mass, and yet they seem to push my targets around without really colliding into them somehow. For now, I'll see if I can just get it to work with overlap instead of block.
If you want your projectile to ignore certain actors, you have to put the "Ignore actors while moving" node on your other actor as well when you spawn the projectile. I also explain this in the tutorial
I meant that my target is not getting hit by the projectile. Genuinely confused as to why that was the case as I checked numerous times the collision settings on the mesh/capsule collision. Homing projectiles would just go right past my basic boss enemy, but weirdly at times it would seem to push the enemy around. I tested it on other enemies and it seemed to work fine. I'm guessing some setting might have changed at some point by a coworker, but I couldn't find the reason after spending too much time trying to debug.
I managed to get it to work with overlap, so I've moved on as I'm trying to prioritize getting a prototype working first. Appreciate your reply and your tutorials have been extremely helpful! @@AliElZoheiry
Ive checked literally everything more then five times but can't seem to figure out why I keep receiving:
Blueprint Runtime Error: "Accessed None trying to read property Target". Node: Set Velocity Graph: EventGraph Function: Execute Ubergraph BP Projectile Base Blueprint: BP_Projectile_Base
My projectile wall is shooting the ice lances sideways instead of straight on, it worked before but somehow after a compile it stopped working and I just can't see what's wrong, what should I do?
Hey Nikoma, cant really tell what the issue is simply by the description, but it could be that you're not checking if the target is valid before setting the velocity of the projectile based on a target.
If that's not the issue, feel free to join the Discord server and ask your question there with more details 🙏
@@AliElZoheiry Yes, that did it for me.
hey i just wanted to ask 29:46 i should recreate this? because i cant add ignore actor when mooving version i use is 5.2 what do i do
I'm using v5.2 as well and ignore actor when moving is available there, so you should be able to follow it exactly as I do
@@AliElZoheirytheres no button like that but how inunderstand i should recreate that code? U just skipped that part so i dont understand properly
@@AliElZoheiry answer pls
@@hovonerthat projectile shooter is just a way to demo the projectile, you don't have to recreate it and it's not related to the ignore actor while moving, this should be done regardless
Hello! I am using your tutorial for my enemies to do damage to the character. I want the player to have an ability where they can block the projectiles to stop the damage. What is the best way to go about this? would I just make the sphere surrounding the character block all dynamic so it can never hit the player? thank you for the great tutorial
The way I did it as part of my Smart Enemy AI series, is that when I take damage, I then check if the character was blocking, if true, then i dont apply the damage and I play a block animation, if false, I proceed with applying damage normally
Starting at 36:00
I am wondering how I can toggle or select through different projectiles or go from a first projectile or second projectile as I press either 1 key or 2 key.
In the spawn actor from class node, you can make the projectile class a variable, then change the value of that variable when you press a key or do a certain action.
@@AliElZoheiry Hmmm that might be similar to how I did it using a selector node, but now I'm trying to make a shotgun projectile that shoots multiple at a time and I'm making a branch saying if 2 is pressed then it goes to the separate shotgun projectile spawn and when I do the for loop from that branch from true, the for loop isn't activating, or my collision is weird, but the shotgun projectile is indeed spawning, just not more that one at a time.