How To Set Up Third Person Line Trace With Random Bullet Spread - Unreal Engine 5 Tutorial

Поділитися
Вставка
  • Опубліковано 6 лют 2025

КОМЕНТАРІ • 30

  • @PitchforkAcademy
    @PitchforkAcademy  2 місяці тому

    The Military Weapons Dark and Military Weapons Silver asset packs are not available on Fab due to being long-abandoned by their creator. I have zipped a blank project with both weapons packs and uploaded it to Drive for use with my tutorials. Download it via the link below, extract the project and open it, select both weapons pack folders and right click then 'migrate' and select the 'content' folder of your project to add them and follow along. 🙂
    drive.google.com/file/d/1mWnQoWsF15rccD63gwmpsxtZpn83B_2U/view?usp=sharing
    For a limited time I'm offering lifetime access to my Discord server, Mizzo's Dizzo, to the first 150 people who make a one-time payment of $10USD! 🤯 Head over to my Patreon and jump on board:
    www.patreon.com/MizzoFrizzo

  • @micromunki9076
    @micromunki9076 8 місяців тому

    An amazing tutorial and very easy to follow :)

  • @Edwardwzcl2001
    @Edwardwzcl2001 2 місяці тому

    Amazing tutorial, thank you so much!

  • @HungryConnor
    @HungryConnor Рік тому +3

    I had / have an issue of being able to shoot something if they come between the character and the camera e.g shooting backwards. I've temporarily solved this by creating a collision box without collision in the same position as the camera but forwards enough to be approximately in line with the guns muzzle and using this box as the start for the initial line trace

    • @PitchforkAcademy
      @PitchforkAcademy  Рік тому

      Oh yeah I see what you mean. Make the start point of the targeting trace = camera forward vector X 300cm or so, then trial and error until you find a value that makes the start point just in front of the weapon's muzzle... Make sense??

  • @kirkg9644
    @kirkg9644 10 місяців тому +1

    This is awesome, and super helpful!
    How would I add a node that would multiply the shots, making it a shotgun?
    I figured adding multipliers would just increase velocity.

    • @PitchforkAcademy
      @PitchforkAcademy  10 місяців тому

      You can use a For Loop node to make a shotgun... 😉

  • @gamedevunity3dliviopanizzi170
    @gamedevunity3dliviopanizzi170 7 місяців тому

    hi thanks for the tutorial , i have one problem witch the collision of the mesh , the trace line not revel the collision non working also if have one problem witch the collision of the mesh , the trace line not revel the collision non working also if have switch off in ignore the collision of the capsule

  • @maxmip6506
    @maxmip6506 Місяць тому

    Thank you a lot! Amazing tutorial series you've been made! After followed this vedio, I met a bug when shooting into shy the trace goes to 0,0,0. What's happeing there?

    • @MihalyLocziMIKE
      @MihalyLocziMIKE 26 днів тому

      Same happening to me. I just come up with a solution:
      after the aiming line trace do a select based on the linetrace return bool. The select will be select input A / B based on this bool. Pin A should be connected to the aiming trace's break pin component's "Location" pin. Pin B should be connected to the "trace end" pin. The output of the selector will be used as the "old" location pin connection presented in the video.
      What it does: If there is the hit, the bullet hit location will follow the way presented in the video, if there is no hit, the bullet will travel to the aiming trace's end location, and of course follow the spread logic.
      I hope I could help.

  • @NEWARTSTUDiOS
    @NEWARTSTUDiOS 3 місяці тому

    When I crouch, it still keeps line tracing from standing position, line trace doesn't follow crouching. Any solutions?

  • @humbertomilanez7621
    @humbertomilanez7621 8 місяців тому

    Thank you.

  • @MagnumPierce
    @MagnumPierce 8 місяців тому

    Awesome vid, it was very helpful, but which tutorial of yours shows us how to create the aiming action?

    • @PitchforkAcademy
      @PitchforkAcademy  8 місяців тому

      My third-person shooter tutorial shows this and much more:
      ua-cam.com/video/-IM5IE_XiLI/v-deo.html 🙂

    • @MagnumPierce
      @MagnumPierce 8 місяців тому +1

      @@PitchforkAcademy Thank you kind sir, you earned a sub!

  • @TheDeathbyPurple
    @TheDeathbyPurple 8 місяців тому

    thank you

  • @sleepingsoundsstudio4670
    @sleepingsoundsstudio4670 11 місяців тому

    Have you ever considered about making an enemy AI that shoots the player? I didn’t find a good tutorial about that on yt.

    • @PitchforkAcademy
      @PitchforkAcademy  11 місяців тому

      They are out there, but yes I can try to do that at some point. 🙂

  • @daybydaylight712
    @daybydaylight712 Рік тому

    Why do we need 2 linetraces? I think we can use just the last one right?

    • @PitchforkAcademy
      @PitchforkAcademy  Рік тому

      Not to achieve what I show you in the video. 🙂

    • @oliverdudastube
      @oliverdudastube 7 місяців тому

      You wouldn't hit the center of the viewport. Imagine a crosshair in the middle, that's where the camera line trace is aiming. It's to get the hit location vector for your second line trace, so the bullet from your weapon hits some actor directly behind the crosshair. Hope it's clear 😜

  • @porterneon
    @porterneon 5 місяців тому

    nice but please show how to make it network replicated

    • @PitchforkAcademy
      @PitchforkAcademy  5 місяців тому +1

      @@porterneon I already have a huge tutorial about that:
      ua-cam.com/video/FR81TqmZd-4/v-deo.html

    • @porterneon
      @porterneon 5 місяців тому

      @@PitchforkAcademy Good one. Thank you.

  • @earlyaccesscontrol5966
    @earlyaccesscontrol5966 11 місяців тому

    How do you do this with a static mesh?