It's amazing how easily this comes to you when it's beyond difficult for some of us. I can't tell you how long I have looked for this exact tutorial. This was excellent and extremely appreciated. Thank you.
This is great! One question though, how could you randomize the distance between objects? And is there a faster way to add multiple actors into the array rather than manually selecting them in the viewport? thanks!
why is it giving me error? Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Actor Location And Rotation Graph: EventGraph Function: Execute Ubergraph BP Path 3 Blueprint: BP_Path3
Hello, this was a great tutorial with fast speed while still very informative, BUT I was wondering how do I change the speed of the moving objects, but maybe I missed that part?
Great video, helped me a lot! Im having issues with rotating the actor/spline node. When i rotate it in the outliner, and hit play, the csr model reverts back to the initial position
Hello! Hello! First of all, thank you for the amazing tutorial. I’m developing a mechanic very similar to Zuma, where I want to spawn one mesh behind another and have it follow the spline from the point where the spawn occurred. Could you help me with this logic?
Hello! Wonderful tutorial. I'm having an issue with my splines where, when I move them in the viewport via the BP's root component, it's messing with the rotation of the Actor in the level. I'll make a spline pattern, but when I move that pattern around, it keeps rotating like crazy, I'm not sure how to stop that?
hey i had the same issue it ended up being becuase in the construction script for the blueprint i didn't connect the array element in the for each loop with the target in set actor location and rotation node. If that doesn't fix it literally rewatch the video or parts of it and make sure you have everything the same as that will definetely fix it
Thanks this is great! How would i go about implementing this in sequencer for cinematics. And be able to position meshes on the array and trigger the start at a specific point in time? (currently it just seems to do its own thing). thanks again!
great stuff! And perfect timing! I was just trying to find a good tut on this and stumbled across your channel! Works beautifully! Thank you. One question: I was hoping to use it for a bunch of floating cars and so need them to have a more randomized offset/spacing and not just along the single axis but all three? What might be the best way to approach this? Thanks again!
To do something like that there would need to be some major changes and big parts of this system would require pretty major reworks. As a general guide though, you’d make an array for x offset, one for y offset and one for z offset, as well as a float for the max offset. Then fill those arrays with a random number between the max offset and negative max offset in a for each loop at begin play that uses your actor array. Now you have individual offsets for x,y,z for every actor. Which you can add to the actors local space (possibly, you only need x and z or y and z, since one of those axis is the axis of the curve anyway). Keep in mind though, I haven’t tested this so you may run into some issues with this such as the cars could sometimes overlap if there is a lot of them. Hope that gives you a good place to start off with trying to implement your floating cars! :)
Thanks to your tutorial my train moves down the track just like it's supposed to, but I have another question I'm hoping you can help me with, because there doesn't seem to be any videos on the subject. It concerns changing things over time. I need the train to go slower up the hills and to stop at places along the way for a specific period of time and then continue moving again. Is that something that needs to be done in the timeline alpha track, or would I need to add triggers or something else on the track with the associated blueprints? This has me stumped. Thanks again for your time.
that's kind of tricky honestly. you'd likely need to build the whole system up differently from the start to get that to work. at that point, unless you need to use this blueprint A LOT or for some reason need it to work with procedurally generated paths, it's probably not worth doing programmatically and you're better off just animating it.
@@thegamedevcave I kind of thought that. After waiting for so long to finally be able to do this, I'm planning on saving this as a base for many other games, Roller coasters, vehicles on roads, almost any mesh along any track. If I add keyframes along the timeline in the alpha track, will that allow me to manipulate what I'm attempting to do? Again, thanks for the help and all the feedback, you really deserve a lot more views and subscribers.
collisions should be no problem, if you enable physics you may run into a slight issues where the objects are constantly falling down and getting teleporting back up to the spline though which makes them look very jittery.
Im trying to set up an enemy spawner and I thought I could just set this as such so the enemies could just easily follow the path but it seems I need to get the actors from the viewport directly, any workaround you could think? thanks! Edit: Also when one actor is destroyed if i just pick them up from the viewport a massive amount of errors happen due to the actor having been killed, but if I were to tell the BP to stop running when one is killed the others would too, no? BPs confuse the hell out of me.
Can you please do a video on wrapping a rope around a cylinder in runtime or blueprint? Example: line on Fishing reel. UA-cam is my means of learning and you have been a big part of my knowledge of unreal, Thank you.
i'd look into the cable component for something like that. i have it on my list to research it a bit more and make a video about it at some point, but probably not super soon.
Thank you very much for the tutorial. I did everything and watched the video 3 times, but for some reason, my objects just don’t move. They stick to the spline the way they should, but they stay in place when I play simulation. Any advices on common missed things?
I looked through the comments and found your note to enable “movable” on the mesh in question. Everything works perfectly now! Thank you for this tutorial!
When i click on the same add you do to create the timeline 1:05 I Simply get an empty box with some empty dots and noway of connecting Timeline to your PlayTimeLine what do i do?
When i push the, actor array element add button, it moves my spline start point across my level? Why does it move it so far away from where i placed it?
Gods Work!! Best Tut on this subject, just subbed! I do got a tiny problem, ive made my own variant on this, for zombies to jump down/up a ledge, everything works fine except that sometimes a zombies wont finish the spline/timeline and falls midway, any suggestion?
Thank you for this tut Game Cave. How would I go about setting up an offset for individual indexed Actors from the array? If all of my meshes have the same length this works perfectly. I just would like the option to use different size meshes on the same spline.
could make a 2nd array of float type to put in the distance offset, or you could try to make with a map instead, first value being the actor reference, and then having a float with it to decide the offset after that actor
I have a question, I added a mesh, a section of railroad track to my spline, but when I press alt to extend the spline, the track does not become longer, only the spline. For some reason the static mesh will not connect to the spline. Apparently, I'm missing something. Any ideas?
making a mesh follow a spline requires some extra work. i've done thing with that before a good while ago so I dont remember the details , i'd have to read up on it a bit to see how it works exactly, it's not very intuitive , i remember that much :/ but to round out this series of video's I probably should add a tutorial for that too, but that one will take a bit longer since i'll have to do a bit of research of my own.
@@thegamedevcave I followed "How To Make An Object Follow A Spline Path - Unreal Engine Tutorial" by Matt Aspland, which was done in the construction script, using a 'for loop' instead of a 'for each loop,' which works perfectly, but out of the construction script node it was either connect it to the 'for loop' or the 'for each loop,' couldn't connect to both. I'll keep messing with it, if I can't get it to work, it's like I said before, your expertise is well worth waiting for.
@@borrowedtruths6955 you should be able to connect the “finished” or “complete “ pin of the for loop into the input of the for each loop (or the other way around) that way it’ll do both, one after the other
@@thegamedevcave Construction Script to input of 'for loop,' completed from 'for loop' to exec of 'for each for loop' and one has not only a train track that can be built upon a spline, but a train and 5 cars that follow that track. I had to make sure that each of the train cars were the same length because the offset between actors is based on meshes of the same length, but beyond that, I have now the capability to make an entire world based around this train. You, sir, are to be commended. Thank you.
Thank you for this tutorial. I've reviewed the Blueprint thoroughly, but I'm still uncertain where the issue lies. The object stops following the Spline halfway and then resets.
Very strange, that's an issue i haven't heard before. A few ideas: is the timeline set up correctly? going from 0 to 1 in 1 second? if it is exactly halfway, is is possible maybe the spline length value gets divided at some point somewhere? maybe something is not connected up with the math about the offset in the 4 each loop?
@@thegamedevcave , Thank you for the reply. I realized my error just as I was about to remove this post. You're spot on. In the Timeline value graph, my value at the 1-second mark was set to .20, causing my animation to halt prematurely at 20% along the Spline path (ua-cam.com/video/I7vg-WXBtXY/v-deo.htmlsi=aqvJaklVCURtzPsH&t=84). This tutorial is impressive and works wonderfully. Thank you again for your generosity.
Quickest way i can think of right now is probably an array of floats , on begin play add a new entry to the array for every object in yoru obejcts array with a random value between min and max variance and just add that to the distance between (in the for each loop, use the index to get the corresponding float from the float array).
@@thegamedevcave yea did that but it doesnt work as required, I got segmented garage door, segments are long rectangles, I made spline curvet to roll at the top. When I set just location, they do not rotate along the spline at the top. I have tried to edit pivot orientation in 3dsmax, but that did not help. When I set rotation, segments still get oriented long side facing up. Also I had to disable set distance along the spline as my rectangles start to appear from bottom of the door once rolled at the top.
Thanks for the tutorial. I am trying to animate cobblestones under the static car in a sequencer. Is it possible to control the speed of the animated meshes(cobblestone) by keyframes and accelerate or stop it in any time during animation? Thank u!😊
sure! instead of using the deltatime to add to the current position, you can simply expose the variable for it, then when you put this blueprint actor into a sequencer animation, you should be able to animate that value
@@galiafvelikiy4615 My mistake, i was confused with another video where I dont use a timeline, but event tick and delta time instead. What ou'll want to do is make a float variable that you set to public as the alpha for the lerp instead of using the timeline output. So you could get rid of everything to do with the timeline if you're animating that value by hand in the sequencer :) Alternativly, you could also skip using the lerp alltogether and just set "distance along spline" to public and animate that if you prefer.
@@thegamedevcave, but I need the loop behavior of the animation cuz I need this running belt effect of the cobblestone road under the car. Imagine I have Static but rigged car with rotating wheels and when wheels rotating slow I want to move the cobblestone road under it slower and when I accelerate the wheels I want to able to accelerate the speed of the road too... Running Belt concept is a very important point here I don't want just pass from start point to the end point I want loop it on the spline... Sorry for the long text, just I am really stuck and want to find a way from these days long trial and errors ❤
Thanks so much for this - I'm making a cyberpunk traffic scene in the background of a project and have utilized this blueprint for consistent background traffic - only problem is the car meshes are rotated 90 degrees at runtime to the left and I'm not sure how to turn them to face forwards - do you have a suggestion for this? Thanks again for this tutorial!
yeah that's the easiest fix. you can also add in a node to add local rotation to the mesh and figure out which axis you need to rotate it in to fix things. but best thing is just to have meshes that are facing the right direct from the start
I had a similar problem with placing a Houdini Y-forward mesh on the spline in Unreal. I faffed around for a bit and then fixed it in Unreal by putting a Rotate Vector node after the Get Rotation at Distance Along Spline node. When you plug that into the last Set Actor Location and Rotation node it automatically inserts a Rotation From X Vector node as well. I set the Y rotation at 90 in the Rotate Vector node. I did this in the Construction script and it fixed the initial rotation, and then did the same in the Event Graph to fix the rotation along the spline. HTH someone.
Would there be any way, using this method, to keyframe the the objects moving around the spline in the sequencer? I'm trying to make a conveyor belt that starts and stops. Even if it was as simple as making one variable public and then keyframing that in the sequencer. It would be perfect. Thanks so much for the tutorial! This is a brilliant way of doing it. I just need to make this one tweak.
you would make your own timeline-like system where instead of using a timeline alpha going from 0 to 1, you have a float varaible to which you add deltatime (you can divide deltatime by how long you want this timeline to be, like if you want the whole loop to take 15 seconds you add deltatime/15). then simply have a bool that you can turn on and off for it to allow that. or just make the float variable you use to lerp public and you should be able to directly animate it in the sequencer I believe.
hey!Great tutorial but i have a question , can we duplicate cube{spline movers ) and attach different meshes in the component ,like i want to create a traffic system where different cars move along with different speed,plz reply
you could multiply the movement speed with based on a 2nd array of floats. in theory that should work, but would probably be pretty clunky. you're probably better off just using different splines (that way it'll also be easier to prevent them clipping through eachother.
sure, you could do something like having an input on your pawn that increases a variable on the spline to drive the alpha of the lerp instead of using a timeline. you may have to experiment a little and change some thing around but that should be manageable to do
Hello From France ! Really incredible tutorial, helpful ! I'm working on cinematics, and i hope i can use your script to work with some arrows. Is there a way to make it visible in cinematics ? (sequencer) Cheers !
what do you need to be visible to the sequencer exactly? any event or variable on a blueprint (given the variable is public) should be open to the sequencer to animate I believe.
Because it didn't be visible without "play" in game mode, i think it couldn't work in a cinematic, but it does ! But i've another question if i can : Is it possible to duplicate the elements in the list, without duplicating them in the game? (instance ?) for now, i've create a folder to contain every arrow i need, because i need a lot...) Cheers ! @@thegamedevcave
the array holds references to instances/objects in your level so if you duplicate those, it'll just have 2 references to the same actor which will likely cause some weird issues. if you want more arrows you'll need to create more arrows in your level and then add those
@@thegamedevcave cheers, i've made a reason :) And folders are my friend, and level Manager too :) In all, many thanks for that, it was exactly what i need !
@@thegamedevcave something important to notice, also for NewBies like me, if you place BP_MoceActors on a layer... Don't forget to make it "Always loaded" And also, if you move it to a layer... It request to reroot all the actors elements... time saver to know that..
I imagine if you just set the z position of the actor equal to the actors original z position that should hopefully work, not sure how the buoyancy system works under the hood though and when/ how it updates locations
Amazing tutorial. I am biginer in blueprints and make a traffic sistem for arviz and i need a lot of cars. How i can use a few objects and make more on my spline? For example i add 5 cars and on spline i have 50. Thanks in advance!
you should be able to add as many cars to the array as you want, of course, provided they would all fit on the spline. if you want multiple lanes of cares, you can simply add the blueprint into the level a 2nd time and add more cars to that 2nd spline :)
@@denat5108 any workaround i can think of for that would only overcomplicate things and make it more tedious unless there is 1000+ cars that you need to spawn in. In general just having to add them 1 by 1 is the easiest way to go about it i'm afraid
@@thegamedevcave i saw tuts where autor controled amount of objects but all of tuts are abount static objects not animation... ua-cam.com/video/kpD9gqEMz5w/v-deo.html
@@thegamedevcave on your tutorial about mesh follow spline at the beginning many cubes fly. U add them 1 by 1? I could donate for help, but I'm from Russia and international payment systems are blocked here
@@thegamedevcave I've made this into my simple game in which a 3d model airship is flying around and my first person character jumps onto the ship and lands on it, standing and waking around just fine for maybe 20 seconds, but then while just standing on it, the character falls off the ship. How can i make the character stay on the ship until the player wants to jump off.?
instead of using a timeline, make a float variable that you expose/ make public. then you can animate that value in the sequencer, i believe if your spline loops, when you go over a value of 1, it should jsut keep going over the loop. otherwise you'll have to animate it to a value of 1 and then next frame reset it back to 0, or just set the sequence animation to loop. the positions of everything at a value of 1 should be the same as they are at value 0
It's amazing how easily this comes to you when it's beyond difficult for some of us. I can't tell you how long I have looked for this exact tutorial. This was excellent and extremely appreciated. Thank you.
Very well done, thank you, got this working on my project - your breakdown of each step was very helpful
It took some creative thinking to be able to modify this to work on non-looping splines!
This is great! One question though, how could you randomize the distance between objects? And is there a faster way to add multiple actors into the array rather than manually selecting them in the viewport? thanks!
why is it giving me error?
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Actor Location And Rotation Graph: EventGraph Function: Execute Ubergraph BP Path 3 Blueprint: BP_Path3
you likely have an empty spot in your array, make sure all the index that you add have a value
Thank you for the great tutorial. Is there any way to get the same animation when I play the sequencer??
Hello, this was a great tutorial with fast speed while still very informative, BUT I was wondering how do I change the speed of the moving objects, but maybe I missed that part?
change your timeline length float var
would this work for tank treads? I don't need anything complicated with physics in my game as it will all be on flat ground.
Nice one! 😊
Fantastic, this is so useful.
Great video, helped me a lot! Im having issues with rotating the actor/spline node. When i rotate it in the outliner, and hit play, the csr model reverts back to the initial position
Hello!
Hello! First of all, thank you for the amazing tutorial. I’m developing a mechanic very similar to Zuma, where I want to spawn one mesh behind another and have it follow the spline from the point where the spawn occurred. Could you help me with this logic?
Hello! Wonderful tutorial. I'm having an issue with my splines where, when I move them in the viewport via the BP's root component, it's messing with the rotation of the Actor in the level. I'll make a spline pattern, but when I move that pattern around, it keeps rotating like crazy, I'm not sure how to stop that?
hey i had the same issue it ended up being becuase in the construction script for the blueprint i didn't connect the array element in the for each loop with the target in set actor location and rotation node. If that doesn't fix it literally rewatch the video or parts of it and make sure you have everything the same as that will definetely fix it
Thanks this is great! How would i go about implementing this in sequencer for cinematics. And be able to position meshes on the array and trigger the start at a specific point in time? (currently it just seems to do its own thing). thanks again!
great stuff! And perfect timing! I was just trying to find a good tut on this and stumbled across your channel! Works beautifully! Thank you.
One question: I was hoping to use it for a bunch of floating cars and so need them to have a more randomized offset/spacing and not just along the single axis but all three? What might be the best way to approach this? Thanks again!
To do something like that there would need to be some major changes and big parts of this system would require pretty major reworks.
As a general guide though, you’d make an array for x offset, one for y offset and one for z offset, as well as a float for the max offset. Then fill those arrays with a random number between the max offset and negative max offset in a for each loop at begin play that uses your actor array. Now you have individual offsets for x,y,z for every actor. Which you can add to the actors local space (possibly, you only need x and z or y and z, since one of those axis is the axis of the curve anyway).
Keep in mind though, I haven’t tested this so you may run into some issues with this such as the cars could sometimes overlap if there is a lot of them.
Hope that gives you a good place to start off with trying to implement your floating cars! :)
@@thegamedevcave thanks for taking the time to explain! Will give it a try
Thanks to your tutorial my train moves down the track just like it's supposed to, but I have another question I'm hoping you can help me with, because there doesn't seem to be any videos on the subject. It concerns changing things over time. I need the train to go slower up the hills and to stop at places along the way for a specific period of time and then continue moving again.
Is that something that needs to be done in the timeline alpha track, or would I need to add triggers or something else on the track with the associated blueprints? This has me stumped.
Thanks again for your time.
that's kind of tricky honestly. you'd likely need to build the whole system up differently from the start to get that to work.
at that point, unless you need to use this blueprint A LOT or for some reason need it to work with procedurally generated paths, it's probably not worth doing programmatically and you're better off just animating it.
@@thegamedevcave I kind of thought that. After waiting for so long to finally be able to do this, I'm planning on saving this as a base for many other games, Roller coasters, vehicles on roads, almost any mesh along any track.
If I add keyframes along the timeline in the alpha track, will that allow me to manipulate what I'm attempting to do? Again, thanks for the help and all the feedback, you really deserve a lot more views and subscribers.
@@borrowedtruths6955 yeah animating the alpha instead of using a timeline should work well with this system I think :)
Wonderful Tutorial! Can the meshes following spline have collisions enabled and effect other physics enabled actors and pawns?
collisions should be no problem, if you enable physics you may run into a slight issues where the objects are constantly falling down and getting teleporting back up to the spline though which makes them look very jittery.
@@thegamedevcave Thats great! Thanks a lot man appreciate it.
Im trying to set up an enemy spawner and I thought I could just set this as such so the enemies could just easily follow the path but it seems I need to get the actors from the viewport directly, any workaround you could think? thanks!
Edit: Also when one actor is destroyed if i just pick them up from the viewport a massive amount of errors happen due to the actor having been killed, but if I were to tell the BP to stop running when one is killed the others would too, no? BPs confuse the hell out of me.
Can you please do a video on wrapping a rope around a cylinder in runtime or blueprint? Example: line on Fishing reel. UA-cam is my means of learning and you have been a big part of my knowledge of unreal, Thank you.
i'd look into the cable component for something like that. i have it on my list to research it a bit more and make a video about it at some point, but probably not super soon.
Thank you very much for the tutorial. I did everything and watched the video 3 times, but for some reason, my objects just don’t move. They stick to the spline the way they should, but they stay in place when I play simulation. Any advices on common missed things?
I looked through the comments and found your note to enable “movable” on the mesh in question. Everything works perfectly now! Thank you for this tutorial!
When i click on the same add you do to create the timeline 1:05 I Simply get an empty box with some empty dots and noway of connecting Timeline to your PlayTimeLine what do i do?
You may need to just right click instead of pulling off an event and search for “add timeline”
thank you ! really helpfull ! How could you reuse the same bluprint to make other copy of it?
When i push the, actor array element add button, it moves my spline start point across my level? Why does it move it so far away from where i placed it?
found out why. My coordinate space drop down menus in construct script and event graph were set differently. both set to world stopped it relocating
Gods Work!! Best Tut on this subject, just subbed! I do got a tiny problem, ive made my own variant on this, for zombies to jump down/up a ledge, everything works fine except that sometimes a zombies wont finish the spline/timeline and falls midway, any suggestion?
please Correct the timeline length
Thank you for this tut Game Cave. How would I go about setting up an offset for individual indexed Actors from the array? If all of my meshes have the same length this works perfectly. I just would like the option to use different size meshes on the same spline.
could make a 2nd array of float type to put in the distance offset, or you could try to make with a map instead, first value being the actor reference, and then having a float with it to decide the offset after that actor
@@thegamedevcave Thanks! I'll give it a try.
I have a question, I added a mesh, a section of railroad track to my spline, but when I press alt to extend the spline, the track does not become longer, only the spline. For some reason the static mesh will not connect to the spline. Apparently, I'm missing something. Any ideas?
making a mesh follow a spline requires some extra work. i've done thing with that before a good while ago so I dont remember the details , i'd have to read up on it a bit to see how it works exactly, it's not very intuitive , i remember that much :/
but to round out this series of video's I probably should add a tutorial for that too, but that one will take a bit longer since i'll have to do a bit of research of my own.
@@thegamedevcave I followed "How To Make An Object Follow A Spline Path - Unreal Engine Tutorial" by Matt Aspland, which was done in the construction script, using a 'for loop' instead of a 'for each loop,' which works perfectly, but out of the construction script node it was either connect it to the 'for loop' or the 'for each loop,' couldn't connect to both.
I'll keep messing with it, if I can't get it to work, it's like I said before, your expertise is well worth waiting for.
@@borrowedtruths6955 you should be able to connect the “finished” or “complete “ pin of the for loop into the input of the for each loop (or the other way around) that way it’ll do both, one after the other
@@thegamedevcave Construction Script to input of 'for loop,' completed from 'for loop' to exec of 'for each for loop' and one has not only a train track that can be built upon a spline, but a train and 5 cars that follow that track. I had to make sure that each of the train cars were the same length because the offset between actors is based on meshes of the same length, but beyond that, I have now the capability to make an entire world based around this train.
You, sir, are to be commended.
Thank you.
Thank you for this tutorial. I've reviewed the Blueprint thoroughly, but I'm still uncertain where the issue lies. The object stops following the Spline halfway and then resets.
Very strange, that's an issue i haven't heard before. A few ideas:
is the timeline set up correctly? going from 0 to 1 in 1 second?
if it is exactly halfway, is is possible maybe the spline length value gets divided at some point somewhere?
maybe something is not connected up with the math about the offset in the 4 each loop?
@@thegamedevcave , Thank you for the reply. I realized my error just as I was about to remove this post. You're spot on. In the Timeline value graph, my value at the 1-second mark was set to .20, causing my animation to halt prematurely at 20% along the Spline path (ua-cam.com/video/I7vg-WXBtXY/v-deo.htmlsi=aqvJaklVCURtzPsH&t=84). This tutorial is impressive and works wonderfully. Thank you again for your generosity.
Thanks! helped a lot , although trying too randomize the distance between objects? as I am using this for traffic cars.
Quickest way i can think of right now is probably an array of floats , on begin play add a new entry to the array for every object in yoru obejcts array with a random value between min and max variance and just add that to the distance between (in the for each loop, use the index to get the corresponding float from the float array).
Great tutorial, how to get actor to position along needed axis (X,Y,Z) without editing pivot rotation axis?
just only set position and not set rotation
@@thegamedevcave yea did that but it doesnt work as required, I got segmented garage door, segments are long rectangles, I made spline curvet to roll at the top. When I set just location, they do not rotate along the spline at the top. I have tried to edit pivot orientation in 3dsmax, but that did not help. When I set rotation, segments still get oriented long side facing up. Also I had to disable set distance along the spline as my rectangles start to appear from bottom of the door once rolled at the top.
Thanks for the tutorial. I am trying to animate cobblestones under the static car in a sequencer. Is it possible to control the speed of the animated meshes(cobblestone) by keyframes and accelerate or stop it in any time during animation? Thank u!😊
sure! instead of using the deltatime to add to the current position, you can simply expose the variable for it, then when you put this blueprint actor into a sequencer animation, you should be able to animate that value
@@thegamedevcave Thank u for the fast reply! ❤ Do u mean to expose Delta Time as a variable?
@@galiafvelikiy4615 My mistake, i was confused with another video where I dont use a timeline, but event tick and delta time instead.
What ou'll want to do is make a float variable that you set to public as the alpha for the lerp instead of using the timeline output. So you could get rid of everything to do with the timeline if you're animating that value by hand in the sequencer :)
Alternativly, you could also skip using the lerp alltogether and just set "distance along spline" to public and animate that if you prefer.
@@thegamedevcave, but I need the loop behavior of the animation cuz I need this running belt effect of the cobblestone road under the car. Imagine I have Static but rigged car with rotating wheels and when wheels rotating slow I want to move the cobblestone road under it slower and when I accelerate the wheels I want to able to accelerate the speed of the road too... Running Belt concept is a very important point here I don't want just pass from start point to the end point I want loop it on the spline... Sorry for the long text, just I am really stuck and want to find a way from these days long trial and errors ❤
@@galiafvelikiy4615 that should work with this. otherwise you're maybe better off just scrolling the texture with a material instead.
haaaaaaaaaa its not working and I'm doing everything correct! Im starting the simulation and nothing happened 😭😭😭😭
I had a similar issue, make sure the “Get Location/Rotation at Distance Along Spline” are set to world in the event graph and construction script.
When I try to add my actors onto my spline, they don't show up like your blue cubes did on your spline. Any suggestions on how to fix this?
make sure the selected actor, in the details panel, is set to movable
Thanks so much for this - I'm making a cyberpunk traffic scene in the background of a project and have utilized this blueprint for consistent background traffic - only problem is the car meshes are rotated 90 degrees at runtime to the left and I'm not sure how to turn them to face forwards - do you have a suggestion for this? Thanks again for this tutorial!
Figured out a rough fix - reimporting the base mesh with a specific rotation angle to face forwards on the spline seems to work for me.
yeah that's the easiest fix. you can also add in a node to add local rotation to the mesh and figure out which axis you need to rotate it in to fix things. but best thing is just to have meshes that are facing the right direct from the start
@@thegamedevcave thanks for the response!
I had a similar problem with placing a Houdini Y-forward mesh on the spline in Unreal. I faffed around for a bit and then fixed it in Unreal by putting a Rotate Vector node after the Get Rotation at Distance Along Spline node. When you plug that into the last Set Actor Location and Rotation node it automatically inserts a Rotation From X Vector node as well. I set the Y rotation at 90 in the Rotate Vector node. I did this in the Construction script and it fixed the initial rotation, and then did the same in the Event Graph to fix the rotation along the spline. HTH someone.
Thanks for Tutorial ,its working .its Awesome. i don't want to loop run after end off curve i want to stop ,any idea, can ple help me.
Just don't connect the node at 8:24 and you'll be fine :D
thanks again sir
Always welcome!
Thanks!
Would there be any way, using this method, to keyframe the the objects moving around the spline in the sequencer? I'm trying to make a conveyor belt that starts and stops.
Even if it was as simple as making one variable public and then keyframing that in the sequencer. It would be perfect.
Thanks so much for the tutorial! This is a brilliant way of doing it. I just need to make this one tweak.
you would make your own timeline-like system where instead of using a timeline alpha going from 0 to 1, you have a float varaible to which you add deltatime (you can divide deltatime by how long you want this timeline to be, like if you want the whole loop to take 15 seconds you add deltatime/15).
then simply have a bool that you can turn on and off for it to allow that. or just make the float variable you use to lerp public and you should be able to directly animate it in the sequencer I believe.
@@thegamedevcave Thanks so much for the fast response! I'll try this out.
@@thegamedevcave I'm really new to UE and Blueprint. How would I tie in the deltatime float so that I can edit in the sequencer?
hey!Great tutorial but i have a question , can we duplicate cube{spline movers ) and attach different meshes in the component ,like i want to create a traffic system where different cars move along with different speed,plz reply
you could multiply the movement speed with based on a 2nd array of floats. in theory that should work, but would probably be pretty clunky. you're probably better off just using different splines (that way it'll also be easier to prevent them clipping through eachother.
@@thegamedevcave u saying that -duplicate the blueprint (each car movers blueprint) and attach to every single spline separately
Nice job. Please can this be done in a pawn and controlled?
sure, you could do something like having an input on your pawn that increases a variable on the spline to drive the alpha of the lerp instead of using a timeline. you may have to experiment a little and change some thing around but that should be manageable to do
thank you so much
Hello From France !
Really incredible tutorial, helpful !
I'm working on cinematics, and i hope i can use your script to work with some arrows.
Is there a way to make it visible in cinematics ? (sequencer)
Cheers !
what do you need to be visible to the sequencer exactly? any event or variable on a blueprint (given the variable is public) should be open to the sequencer to animate I believe.
Because it didn't be visible without "play" in game mode, i think it couldn't work in a cinematic, but it does !
But i've another question if i can : Is it possible to duplicate the elements in the list, without duplicating them in the game? (instance ?) for now, i've create a folder to contain every arrow i need, because i need a lot...)
Cheers !
@@thegamedevcave
the array holds references to instances/objects in your level so if you duplicate those, it'll just have 2 references to the same actor which will likely cause some weird issues. if you want more arrows you'll need to create more arrows in your level and then add those
@@thegamedevcave cheers, i've made a reason :) And folders are my friend, and level Manager too :)
In all, many thanks for that, it was exactly what i need !
@@thegamedevcave something important to notice, also for NewBies like me, if you place BP_MoceActors on a layer... Don't forget to make it "Always loaded" And also, if you move it to a layer... It request to reroot all the actors elements...
time saver to know that..
i need theis but on water and buoyancy any light? how delete z axis?
I imagine if you just set the z position of the actor equal to the actors original z position that should hopefully work, not sure how the buoyancy system works under the hood though and when/ how it updates locations
Amazing tutorial. I am biginer in blueprints and make a traffic sistem for arviz and i need a lot of cars. How i can use a few objects and make more on my spline? For example i add 5 cars and on spline i have 50. Thanks in advance!
you should be able to add as many cars to the array as you want, of course, provided they would all fit on the spline. if you want multiple lanes of cares, you can simply add the blueprint into the level a 2nd time and add more cars to that 2nd spline :)
@@thegamedevcave i mean i dont want to duplicate 5 cars to 50 and add each of 50 same cars individually
@@denat5108 any workaround i can think of for that would only overcomplicate things and make it more tedious unless there is 1000+ cars that you need to spawn in. In general just having to add them 1 by 1 is the easiest way to go about it i'm afraid
@@thegamedevcave i saw tuts where autor controled amount of objects but all of tuts are abount static objects not animation...
ua-cam.com/video/kpD9gqEMz5w/v-deo.html
@@thegamedevcave on your tutorial about mesh follow spline at the beginning many cubes fly. U add them 1 by 1? I could donate for help, but I'm from Russia and international payment systems are blocked here
Great thank you.
You are welcome!
@@thegamedevcave I've made this into my simple game in which a 3d model airship is flying around and my first person character jumps onto the ship and lands on it, standing and waking around just fine for maybe 20 seconds, but then while just standing on it, the character falls off the ship. How can i make the character stay on the ship until the player wants to jump off.?
@@endtasid you have to parent the character to the ship
how can i do that?
@@thegamedevcave
Nice
How to use it in sequencer with loop?
instead of using a timeline, make a float variable that you expose/ make public. then you can animate that value in the sequencer, i believe if your spline loops, when you go over a value of 1, it should jsut keep going over the loop. otherwise you'll have to animate it to a value of 1 and then next frame reset it back to 0, or just set the sequence animation to loop. the positions of everything at a value of 1 should be the same as they are at value 0
i'll try it@@thegamedevcave
Thank you so much this was a lifesaver
Thanks!
Glad i could help!!