HITSCAN vs PROJECTILE | Explanation and Unreal Engine Implementation [UE4/UE5 EA2]

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 43

  • @CobraCode
    @CobraCode  2 года назад +5

    I was informed that the First Person Template was updated with the full release of UE5, so some things differ from the UE5 Early Access 2 version I'm using in this video.
    Sadly the crosshair is gone now, but other than that only the place where we put our shooting logic changes!
    Instead of adding that after InputAction Fire on FirstPersonCharacter, we now just put everything after the OnFireProjectile event in BP_Rifle!

    • @CobraCode
      @CobraCode  2 года назад

      @Ladops Are you on the newest version of Unreal Engine 5?
      Then the logic for shooting should now be triggered in BP_Rifle from OnFireProjectile and not inside the first person character anymore like in the video

  • @UndeadMunchies
    @UndeadMunchies 2 года назад +9

    Honestly the best tutorial I have seen on anything gam dev so far. Most tutorials either dont work, require you to have assets that they dont provide for you, or are implementing systems in ways that nobody would actually want to have in a game with any resemblance of quality. As soon as you showed gameplay of an actual game youre making, I immediately thought, "this dude knows what he's talking about." No problems. No instances of watching over the video 10 times to see why I did something the exact same but its not working. I was able to follow this without a single issue the entire way, and I didnt even do exactly what you said since Im working in VR, making the blueprints I have different.

    • @CobraCode
      @CobraCode  2 года назад

      Thank you so much!
      This is extremely valuable feedback.
      It's super helpful to know the details viewers care about and I'm glad It seems like I'm already doing a lot of things right, so I'll make sure to keep this up for future videos.

  • @Arva_
    @Arva_ 3 месяца назад +2

    theres also hybrid system like in newer cod games where till a certain time or range the bullet is a hitscan, but past that time it will become a projectile

  • @Livuna85
    @Livuna85 Год назад +2

    Thank you so much! So many other channels just ignore the basic construction.
    Absolute god-send.

  • @ThatFire9oNe6
    @ThatFire9oNe6 Год назад +2

    thank you so much for breaking it down. I couldn't grasp the meaning of "Hitscan" by just reading the definition. This made it clear for both HS and Projectile. A well-deserved Like. Thanks, again!

  • @snowycat6099
    @snowycat6099 Год назад +2

    your video is hidden gem bro

  • @varunverma95
    @varunverma95 2 года назад +6

    Very well explained and nice tutorial. Subscribed ! More tutorial please !!

    • @CobraCode
      @CobraCode  2 года назад +2

      Thank you so much!
      I plan on releasing one new video every two weeks with my current schedule.
      Might be more frequent in the future :)

    • @varunverma95
      @varunverma95 2 года назад +2

      @@CobraCode glad to hear that ! Kudos !

  • @CobraCode
    @CobraCode  2 года назад +4

    Hey guys, welcome to my first video.
    I plan on doing more tutorials like this, but also indie dev logs and more exploratory game dev videos.
    Subscribe if you'd be interested in that kind of content.

  • @Kinos141
    @Kinos141 2 года назад +2

    Most games do a hybrid approach, where they hitscan to a certain distance, then spawn a projectile if the hitscan hits nothing. It blew my mind when I watched a random RUclips video and he discussed the hybrid method for about 2 mins.

    • @CobraCode
      @CobraCode  2 года назад +1

      That's actually a very interesting approach.
      Projectiles can be a bit finicky if the enemy is right in your face, so that makes sense.
      Thanks for the info!

  • @patrikbaboumian
    @patrikbaboumian 2 года назад +1

    Thanks for this! 👊

  • @TRD.G
    @TRD.G 2 года назад +3

    Could you please create a newer version of this amazing tutorial for UE 5.0.3? I would be very grateful, your explanation is very good

    • @CobraCode
      @CobraCode  2 года назад +1

      Thank you!
      I do want to get back to this and make a newer version at some point.
      But I'm currently focusing on making platformers and beat 'em ups, so it'll probably be a while until I get back around to covering shooters.

    • @TRD.G
      @TRD.G 2 года назад +1

      @@CobraCode Ok, thank you anyways! I love that you explained the logic behind both hitscan and projectiles and got them both working, you'r other tutorials are very high quality too

  • @SandeepTogarathi
    @SandeepTogarathi 2 года назад +1

    Good stuff my friend

  • @ericmatthews9894
    @ericmatthews9894 Год назад +1

    Not everything worked first time through, probably my fault, but still a very good tutorial. Subscribed

    • @CobraCode
      @CobraCode  Год назад

      Thank you.
      Yeah a bunch of stuff has changed with the full release of UE5, so a few things aren't applicable anymore.

    • @ericmatthews9894
      @ericmatthews9894 Год назад +1

      @@CobraCode I'm using 4.26 but I'll go back through because I probably did something wrong

  • @yourcreativekit
    @yourcreativekit 11 месяцев назад

    Should do more of these fps related tutorials

  • @leosky789
    @leosky789 2 года назад +1

    You're The Best!

  • @boundlessunrealengine9467
    @boundlessunrealengine9467 2 месяца назад

    Hi. Is it possible to use the niagara system with collision instead of projectiles? Maybe it will be much cheaper in terms of performance?

  • @jephrennaicker4584
    @jephrennaicker4584 11 месяцев назад +1

    Did you do a homing projectile Video? and if not could you. Thank you in Advance !

    • @CobraCode
      @CobraCode  11 месяцев назад +1

      Hey!
      Sorry but FPS tutorials aren't my focus right now.

  • @basilisgkotsis4042
    @basilisgkotsis4042 18 часов назад

    i have greate idea why if Conbine HITSCAN and PROJECTILE

  • @TrojanLube69
    @TrojanLube69 10 месяцев назад

    I have made a line trace system that behaves like a projectile in C++ UE5

  • @Itsme-wt2gu
    @Itsme-wt2gu Год назад

    How to make projectile influence with wind , foilage , and cloth physcics with the same?

  • @SagarKowe
    @SagarKowe Год назад +1

    5:16 DEEZ

  • @tedchilla
    @tedchilla 2 года назад +1

    Hi Cobra Code, thanks for the tutorial, could I trouble you by asking you did they change the BP?
    Because I'm trying to follow this tutorial with 5.0.1 but the FirstPersonCharacter is split into two.
    BP_FirstPersonCharater and BP_Rifle.
    Or is it just me and i need to reset my UE settings?
    And for some strange person i do not have a red crosshair as well :L

    • @CobraCode
      @CobraCode  2 года назад +1

      Hey, thanks for pointing that out!
      I recorded the video with UE5 Early Access 2, but it seems they have completely overhauled the first person template with the full release of UE5 now and like you mentioned the functionality is now split between the fps character and the gun.
      Yeah seems like there is no crosshair anymore either :(
      The stuff I talk about in the tutorial still works the same though! Just instead of plugging the shooting logic into the fire event on the fps character controller, it now needs to be put after the OnFireProjectile event on the BP_Rifle

    • @tedchilla
      @tedchilla 2 года назад +1

      @@CobraCode All good man, i'm surprised you replied so quickly xD.
      That makes sense, alot of tutorials i'm looking at for UE5 are the Early Access and not the currently one.
      Its a little confusing with 2 BP when there used to be 1.
      I didn't mention it before, but keep up the good work :) I appreciate it a lot that your helping newbies like me out there.
      And i love the way you explain using Games it makes things so much easier to understand.
      I'll try out what u mentioned in the pin comment
      "Instead of adding that after InputAction Fire on FirstPersonCharacter, we now just put everything after the OnFireProjectile event in BP_Rifle"
      Hopefully there's no hiccups xD

    • @CobraCode
      @CobraCode  2 года назад +1

      @@tedchilla
      Yeah I think none of us content creators expected breaking changes like this for the full release of UE5 since they usually don't tend to update their templates xD
      Yes, splitting it into 2 blueprints can be a bit confusing, but I think it's actually better to have it designed modularly like that and I'm also glad they got rid of all the weird VR stuff in the fps template that should have just been a part of the VR template instead.
      Thank you so much :D
      I'm glad that makes it easier to understand!

  • @patrikniens4154
    @patrikniens4154 2 года назад

    Really informative and well made video! A question that popped up tho, is how to handle the VFX when implementing this? With a projectile, it’s quite easy, just make the bullet trail follow the projectile, but how to handle this with hit scan? Just make a bullet effect that goes towards the hit location and they just destroy it? Really curious on how to solve this!

    • @CobraCode
      @CobraCode  2 года назад

      Thank you! That's a good question.
      Yeah I was also wondering that when I did research on this topic, but couldn't really find much about it.
      If you really do need a bullet trail then yeah I think what you suggested is the simplest way to go about it.

  • @LJ-pn3em
    @LJ-pn3em 2 года назад +1

    It's not working for me?? Does this not work in newer version? I did everything and it still shoots projectiles anyway

    • @CobraCode
      @CobraCode  2 года назад

      Hey!
      I made this video using Unreal Engine 5 Early Access 2 and the First Person Template has changed a lot since then, so the implementation part in the video might be hard to code along to for beginners now.
      The biggest change is that the functionality is now split between the first person character and the gun. Instead of using InputAction Fire on the character, we must now use OnFireProjectile in the BP_Rifle to attach our hitscan functionality to. Also all the vr functionality is gone by default so there is no need to delete the nodes shown in the video.
      Also when getting the shooting direction for the hitscan we don't have a reference to the camera inside the bp_rifle so we need to use our FirstPersonCharacter Reference and the FirstPersonCamera on it.
      Since so many things have changed I might want to revisit and redo this tutorial in the future!

  • @YahyaDanboos
    @YahyaDanboos 2 года назад +1

    Ohh interesting, didn't realize how Overwatch used both methods in different ways 😲

  • @kr184
    @kr184 2 года назад

    Really nice, thanks