Unreal Engine 5 Tutorial - Advanced Line Trace

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 15

  • @Iobsterpeterson
    @Iobsterpeterson 7 днів тому

    This helped me with corner detection for wall climbing. Cheers mate!

  • @metalhurtstopunch3696
    @metalhurtstopunch3696 Рік тому +1

    This is exactly what I was looking for, you deserve way more subs for this

  • @ARANDOMOPENAIUSER
    @ARANDOMOPENAIUSER Рік тому +2

    *(WIP) UE5 - my notes for Advanced Line Traces:*
    1) Starting off in BP_ThirdPersonCharacter
    2) 1:45 Add a function in BP_TPC called "Line Trace"
    3) 2:23 Add a "for loop with break" with the first Index at 1 NOT 0
    4) 3:10 Promote Index to a LOCAL VARIABLE and call it "Line Trace Index"
    5) 3:42 Add a "Standard Line Trace by Channel"
    6) 4:20 Add our forward vector with (Get SELF Actor Rotation) -> (Get Forward Vector) -> (Multiply by Float to find end distance)
    7) 4:58 Add "Get actor location", add the Multiplied Forward Vector with the new "Get Actor Location" to find the True end Distance
    8) 5:17 Get Line trace Index, and add an " == to index 1" booleon check. Add another one for the End distance as well
    9) 5:39 Add "Select Vector" node,
    10) 5:55 Plug in Line Trace Index booleon into "Select Vector" node, leave B empty for now
    11) 6:09 Duplicate the "select Vector Node" , Plug in vector into A and second Booleon check into select Vector
    12: 6:24 Plug in start Vector and End Vector into line trace by channel
    16:16

  • @ryanjdevlin87
    @ryanjdevlin87 Рік тому +1

    Thanks so much this line trace series is helping so much. At the end of the video you say there will b another part talking about line traces but i dont c any videos on the channel titled something like that... am i missing it or its in another video ? Thanks alot for helping me understand line tracing :)

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

      I'm so glad you found it helpful! The next part of the series is going to be coming out soon! I have a video I've been working on going over vector math thats going to come out first to assist in the understanding of ways to modify positions in world space, then the next part of the line traces will be coming out showing how to use this type of system in a few ways such as creating positions for motion warp animation.

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

    This is very educational, thank you for this, it helps beginners a lot!

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

    Great tutorials! Thank you!!
    So, I want my character to only see the intractability of an item when he gets close enough. Would this be a good example of when to use a line trace?
    I'm making it so my widget appears over an item when I get close enough. Can I quickly do this via the blueprint actor where my item mesh is? Or would the logic for this still be done on a line trace of my third-person character?

    • @ArtofficialEntertainment
      @ArtofficialEntertainment  Рік тому +1

      Thank you very much!!
      Yeah you can use a line trace for this but the trace would need to run to get the object info so run it off a custom event and place that custom event call off of camera movement this way it will call the trace when the camera receives input (aka moving the mouse for PC input)

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

    how would you reverse the same line trace to give you the thickness of a mesh?
    like... if that line trace hit point is A, and the other side of that mesh is B, how would you use this technique to know the length from B to A?

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

    I want the Hit result for each trace hit. Where shall i put the return node?

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

      If you want to save it and it's multiple traces i would make an array of vector positions, and just have it add the hit location for every hit. Now if you're using the first hit to set locations for the other traces, just add a branch to see if the index off the for loop is greater than 1 at the end so it only saves the positions AFTER the initial trace.

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

    Very cool

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

    Can you give an example how this would be used for a complex combat system?
    Please I’m a noob.
    Thank you.

    • @ArtofficialEntertainment
      @ArtofficialEntertainment  Рік тому +1

      There will be a video that's part of the multi weapon system series going over damage applications of weapons coming out this weekend using this type of trace system.
      So will be a video coming out on this exact subject very soon! :)

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

    Thanks Man