*(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
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 :)
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.
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?
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)
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?
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.
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! :)
This helped me with corner detection for wall climbing. Cheers mate!
This is exactly what I was looking for, you deserve way more subs for this
*(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
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 :)
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.
This is very educational, thank you for this, it helps beginners a lot!
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?
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)
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?
I want the Hit result for each trace hit. Where shall i put the return node?
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.
Very cool
Can you give an example how this would be used for a complex combat system?
Please I’m a noob.
Thank you.
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! :)
Thanks Man