Тёмный

Unreal Engine 5 Tutorial - Using Line Tracing 

Artofficial Entertainment
Подписаться 2,5 тыс.
Просмотров 10 тыс.
50% 1

Hey everyone! Got an exciting one here today! The fundamentals of using the trace system!! So many things can be done with this system and in this video i go over several uses and functions of the line trace system as well as how they differ from sphere traces and how to set up your own trace channels
/ artofficialentertainme...
Discord Link: / discord
Patreon Link for model, animation and game systems: patreon.com/ArtofficialEntertainment

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@YQ4869
@YQ4869 6 месяцев назад
The custom trace channel tech is soo helpful, thanks for the tutorial!
@atharvatandel7139
@atharvatandel7139 Год назад
Great Tutorial for Unreal 5, all other tutorials i found were for unreal 4 mostly.. and this was really helpful thanks..
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
Thank you very much! 😀
@LehushasProduction
@LehushasProduction 2 месяца назад
What a nice tutorial!! It helped me with a completely different problem, but thanks to you I saw how to connect rotation properly, thankssss!
@johnrex7108
@johnrex7108 7 месяцев назад
Terrific video, man. These videos have helped me a lot. Earned yourself a subscriber. That being said, anyone else notice anything "funny" around 33:25
@billy-bg9rx
@billy-bg9rx 4 месяца назад
Thank you kindly!
@synastershred2269
@synastershred2269 Год назад
Can you do a tutorial on adding a third person cover system using line traces?
@mauromarquet701
@mauromarquet701 5 месяцев назад
I loved the tutorial! Congratulations. I have a question for you. I want to perform a line trace by profile inside the animation blueprint, but I want the line to start from the head and go down to the ground. By default, the line starts from the waist, and I need it to set up footstep sounds at different depths of water. Thank you very much!
@ArtofficialEntertainment
@ArtofficialEntertainment 5 месяцев назад
You would just need to alter the actor location. If you add a value to the Z of the actor location before adding to the rotate values it will change the starting position. Just play around with the add until it starts where you want it :)
@mauromarquet701
@mauromarquet701 5 месяцев назад
@@ArtofficialEntertainment Thanks you so much. You know, I did it that way already; I drew two lines, one downward and one upward, to calculate the sound of the water when I'm almost fully submerged, but still with my feet on the bottom.
@JAPAWEI74
@JAPAWEI74 Год назад
Very good, concise tutorial. Keep it up, great stuff!
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
Thank you so much!! And trust me we are just getting started :)
@iDentityUS
@iDentityUS Год назад
If the trace channel is on visibility then what should the other channels be for enemies whom I’m trying to deal damage to? They are not taking any damage from my line trace I even made my own trace channel and allocated the bullet hit scan to that channel. Then on the enemy I blocked that trace channel on my capsule component and mesh. I’m really confused as to how this works
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
The trace channel you set in the line trace node needs to be what is set to "block" under the collision settings. So if you have a line trace with a custom channel named "player attack" - whatever enemy you want to damage has to have that trace channel set to "block". Visibility is just a prenamed channel. It's not referencing being able to view the trace. That's what the draw debug drop down is for.
@ryanjdevlin87
@ryanjdevlin87 9 месяцев назад
I know i need to learn the basics of vector math alot more but how do I compensate for North/South VS East/West when adding to the X and Y values directly. like say the char is face north ... the x value is his right and left ... but when face east... the Y value is his left and right ... how do i compensate for that ?
@ArtofficialEntertainment
@ArtofficialEntertainment 9 месяцев назад
If you want to have direct north south east west with fixed positions no matter the facing direction then that's a bit harder. Possible to use world vector values but really line trace should be used for character item identification and as such will generally be best if used based off either camera rotation or actor rotation and then can get the right vector or the forward vector. Then when you multiply the float value, positive numbers will go in the direction of the vector (so forward vector goes forward), a negative number goes in the opposite ( so forward vector now becomes the behind vector) and same goes for right and up vectors. Positive goes up or right, negative will go down or left.
@ryanjdevlin87
@ryanjdevlin87 9 месяцев назад
@ArtofficialEntertainment thanks so much, so what I'm doing is building a ledge hang mechanic with shuffle side to side movement. I got everything working good as long as when the player attaches to the wall his left and right is the x axis when I rotate the wall 90 degrees and his left and right would be the y axis the whole system breaks because I have everything setup to use the x axis for left and right... I could check the players rotation and determine what the value of his z axis is but that seems super sloopy and could break if the walls aren't always at 90 degree angles I would.think ... any help would be so.much appreciated ! Thanks again man
@kinwer93
@kinwer93 11 месяцев назад
Hey, very nice tutorial. I have an issue, for some reason I can't hook up line trace by channel to break hit result. Do you know how can I fix this?
@ArtofficialEntertainment
@ArtofficialEntertainment 11 месяцев назад
It's not a hook up - you pull off the blue pin on the line trace outputs and type in break hit result there. It's a structure predefined by the line trace so requires it to be pulled off the line trace itself - can also right click and click on "split struct pin" to expand the hit results on the line trace node itself rather than having a hit result node that's separated
@moneyboy709
@moneyboy709 Год назад
When I try to make a line Trace on, Just when I holdind the left mouse butom, give me a back a error, infinity loop detected, do u know why? Tanks for the help, Nice vídeo!!
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
Hard to say why without seeing how you set up the execution. Infinite loops can be caused by a wide variety of things. Id suggest joining the channel discord and sending some screen grabs in the 'help request" section. There's a few other devs in the discord that are reliable also for assistance on other matters
@moneyboy709
@moneyboy709 Год назад
@@ArtofficialEntertainment tanks dude,!!
@RMC_
@RMC_ Год назад
Do you have to have an end point to the line trace? or can you set infinite distance?
@ArtofficialEntertainment
@ArtofficialEntertainment 11 месяцев назад
Never want to set infinite distance as it will crash. Infinite anything is the cause of most crashes as the calculations have to end in order to start the next process and having to calculate an infinite distance in an infinite space means it won't be able to move on to the next set of calculations. Now with that said I'm not entirely sure how you would set it to infinite on a trace unless you run it on an event tick and set the trace end to be the previous trace end + a float multiplier so it will just go endlessly but again very dangerous and will cause crashes if it doesn't hit anything and has to keep going
@RMC_
@RMC_ 11 месяцев назад
@@ArtofficialEntertainment haha yeah that would be a bad idea... I was more wondering if you had to set an end point for it to work, which it seems like you do. But I'll just have to add zeroes until it tells me to stop :)
@ga9Z
@ga9Z Год назад
Great tutorial bro! Can this also be used in the Soccer game? I would like to add an animation to the goalkeeper to detect exactly when he needs to catch the ball..
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
It can but for a smooth catch system you would need to also use something called motion warping. Its a system that allows you to move animations to locations set by a line trace or any other location data. So you would want a trace for the ball (give some chance for failure) and then once detected set the hit actor object as a variable (which would be the soccer ball) then make a custom event to call the motion warping system to move the character to the balls location, and call that custom event off the branch of the line trace, then attach the ball to the goalies hand if successfully caught using attach actor to component.
@ga9Z
@ga9Z Год назад
​​​​@@ArtofficialEntertainment *Thanks for the reply, yes good idea for Motion Warping. I understand in a way, but it is not clear to me whether I should put the "trace line" on the ball or on the player?* *Because I want to insert more animations that change according to the speed of the ball. For example: can I add trace lines to the goalkeeper animation?* *if you could make the trace line longer, there would be a longer animation when there was a collision with the ball - that is, a shorter trace line for a shorter animation.* *I'm trying to make soccer 1 vs 1 so I want to figure out the logic. But there aren't many tutorials on sports games..*
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
@@ga9Z if you are wanting to have animations based off ball speed, you'll need a few parts. Something to calculate the vector XY velocity of the ball to know when to execute certain animation types. And the trace would be best coming from the player outwards. Possibly best to use a sphere or box trace to increase the detection area. Then using the line trace you can set the object value as a variable that you can use to get actor location so you can use this in the motion warping piece. There's sadly a reason why sports games aren't as heavily developed and that's because with today's systems it's a lot of moving parts to make fluid.
@kjdee140
@kjdee140 Год назад
32:47 I'm a grown adult, I'm a grown adult, I'M A GROWN ADULT!
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
Had the same thought myself lmfao
@JohnRiversOfficial
@JohnRiversOfficial Год назад
THANK YOOOOOOOUUUUU!
@JohnRiversOfficial
@JohnRiversOfficial Год назад
seriously man, this is the holy grail of line trace tuts. thank you very much.
@SergeyBel
@SergeyBel 4 месяца назад
omg dude that is literally the best explanation I have found so far, and I was searching a lot for a good explanation, thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
@srawdawg6188
@srawdawg6188 5 месяцев назад
I never understood line traces before this video. Everyone wants to teach, but not everyone can teach, you can teach brother, good job!
@billysatkowski6938
@billysatkowski6938 Год назад
Thank you for explaining this. I'm trying to get a spider to walk on walls. This should work perfectly as a start to my blueprint.
@kjdee140
@kjdee140 Год назад
How do you get a line trace to rotate with you in real time. Say, you want it to update as long as you have the input held down, and then stops when you release it?
@ArtofficialEntertainment
@ArtofficialEntertainment Год назад
Use "Set timer by event" and call it off a custom event - Then make another custom event ( with a "Clear and invalidiate timer by handle" and hook the output of the Set timer by event in the Handle input - From there you can use the first custom event off "Pressed" and the second off of released for any of the main event keys - So for example, One custom event named "Start Trace" then hook the execution pin into the set timer by event then just also drag from the red event box into the input on the timer, set it to .01 and make sure "looping is checked - Then a second custom event named "End Trace" this hooked into "Clear and invalidate timer by Handle" and then just connecting the blue output pin of the set timer into the clear and invalidate timer - Then off Keyboard event E: Pressed runs start trace // Release runs end trace. I know i typed out a lot for something simple but just wanna make sure i clarify as best as i can on how to do it :)
Далее
Unreal Engine 5 Tutorial - Melee Damage System
14:45
Просмотров 3,9 тыс.
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55
Трудности СГОРЕВШЕЙ BMW M4!
49:41
Просмотров 1,2 млн
Unreal Engine 5 Tutorial - Advanced Line Trace
21:30
Просмотров 4,6 тыс.
How I Remade MW2 with Unreal Engine 5
12:37
Просмотров 3,1 млн
Blueprint Interfaces | Unreal Engine 5 Tutorial
14:41
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55