For rotation use "Get rotation and tangent along spline", that already gives you needed rotation which is actually more accurate. Also you can just select code, RMB it and select "collapse to function" so it will also auto create needed pins.
@SurviveOnlyStrong2 жыл бұрын
there's no such node as of ue5
@irenenaya76442 жыл бұрын
@@SurviveOnlyStrong : GetRotationAtDistanceAlongSpline works fine for me in UE5. You need to pass the index * spacing just as we do to find the location
@RobertGameDev Жыл бұрын
I gave the 100th like! This is so much better! Also confirming (and correcting) the node you want is "Get Rotation at Distance Along Spline" and it works so well! Wish I could post pics in this message to show how its being used. So, basically you want to replace the "Get Location at Distance Along Spline", inside of the "Get Location at Index" function (the one that we made pure following this video), with the "Get Rotation at Distance Along Spline" node. Don't forget to provide the Distance into the "Get Rotation at Distance Along Spline" node.
@JP-eo2pb8 ай бұрын
@@RobertGameDev Do you connect the Get Rotation at Distance Along Spline node to the multiply output and Get Location at Index? Is the Return Value auto creating a Get Rotation X Vector node before connecting its return value to the Return Node? You still using A input for Get Location at Index?
@RobertGameDev8 ай бұрын
@@JP-eo2pb I don't remember! It's been too long. I'll say probably to all of them and ask you to respond here with the results of what you found!
@gabrielepardi51783 жыл бұрын
Clear, short and straight to the point: that's the kind of video I appreciate a lot! Hope more from this from Epic! Thanks guys for your work!!
@tonykim82442 жыл бұрын
For those who want to rotate the meshes with custom values and populate them along the spline with more accurate angles, I would use 'Get Tangent at Distance Along Spline', connect the return value to 'RotationFromXVector', split struct pin of its return value (by clicking the return value pin with RMB and selecting 'split struct pin'), attach 'Add' node to 'Return Value Z', promote the B value of the 'Add' node to a variable and use it as a custom rotation controller for your meshes along the spline, split struct pin of 'Make Transform' node's 'Rotation', connect 'Return Value X' and 'Return Value Y' of the 'RotationFromXVector' to 'Rotaton X' and 'Rotation Y' of the 'Make Transform' node, connect the return value of the 'Add' node to 'Rotation Z'. If you want to control the rotations along X and Y axis as well, do the same for them too like Z.
@musikalniyfanboichik2 жыл бұрын
thank you so much
@DocCube2 жыл бұрын
What do you plug into the Distance for the "get Tangent at distance along spline"?
@tonykim82442 жыл бұрын
@@DocCube Same with what's connected to 'Distance' of 'Get Location at Distance Along Spline", which is 'Index' of the For Loop multiplied by 'Spacing' variable in the video.
@elstinopacino Жыл бұрын
Saved my day
@gabrielepardi5178 Жыл бұрын
Thanks!
@vahida61463 жыл бұрын
It's safer to add the 'ClearInstances' node of the 'InstancedMeshComponent' at the beginning just right after the OnConstruction node. Otherwise, it will create so many meshes on the level while moving the blueprint actor.
@Hung_Nguyen_902 жыл бұрын
This is one of those 10 minutes tutorial that take me 1 hour to follow 😅 But I did it thank you very much
@yusrighouse3 жыл бұрын
This is exactly what I was looking for! I wanted to instance random meshes along the spline so had to adapt the code a bit to suit that. No idea if what I did was the most optimal solution, but it works on my semi-potato so this brings joy. Also really great explanation. Good speed, clear and concise.
@Wishersid2 жыл бұрын
Would you mind sharing the approach you used to adapt it to using random meshes?
@yusrighouse2 жыл бұрын
@@Wishersid create array parameter and have the blueprint randomly pick from array. Use the length of array into a random range node and use that output to choose from array by index.
@Wishersid2 жыл бұрын
@@yusrighouse I ended up doing some other solution since the issue here is that i couldnt figure out a way to use the instanced meshes as well as have them be randomly selected. I will have to look into it some more, thanks!
@ananya.s Жыл бұрын
Hey! Could you share a snippet of this? Would be really helpful. Thanks
@ChrisCohen3 жыл бұрын
Really useful and as others have said, straight to the point, but more importantly, very clear as well. Please keep these up as I'm sure I'm not the only one learning a great deal here!
@busesart Жыл бұрын
This is one of the best tutorials you guys put ouut. Just. Perfect! Thank you. Thank you. You are inspiring and supporting indie devs and artists so much
@andrewinireland2 жыл бұрын
For things such as fences, they dont quite line up, but if you add another "get location" where you add to the distance along the spline half the length (X) of the asset then the corners line up better. requires adding another parameter to the function which is an offset float. then plugging the return value into the location on the make transform.
@Highcastle_of_Geek2 жыл бұрын
Any chance you could show this step by step? I'm not sure where to plug in the "get location" and offset float parameters like you describe. I have the same issue with a fence and it lines up fine when the spline is straight, but I get too large of a gap when I curve the spline.
@zacharoninoodle Жыл бұрын
For those, like me, who are trying to use this code as the base for a chain-link spline, make the following changes to the blueprint you have set up: 1. Drag from the Index output of the For Loop node and connect it to a % (Integer) modulo node and set the other value to 2. 2. Drag from the % (Integer) modulo node output and connect to an Equals node. Leave the other value at zero. 3. Add a Select Rotator function. 4. Connect the output of the Equals node into the Pick A condition of the Select Rotator node. 4. Plug the Make Rot from X node into option A. 5. Drag out from the Make Rot from X node and connect it to a Break Rotator node. 6. Add a Make Rotator node and connect the Y and Z from the Break to the Make. 7. Create an Add node and connect the X from the Break Rotator into it. Set the other value to 90, or a Random Float in Range node with a min and max set somewhere around 90 (if you want randomness). 8. Connect the result from the Add node into the X for the Make Rotator. 9. Connect the Make Rotator result into the B option of the Select Rotator node. 10. Connect the Select Rotator Return Value into the Make Transform Rotation input. 11. Compile! Ensure that your chain link mesh is properly oriented to follow along the mesh length-wise for best results. Tweak as necessary. This method uses a modulo function to determine which instances are indexed as odd. If odd, it will select a secondary rotator which takes the default rotation (as acquired in the tutorial) and simply adds 90 degrees of rotation along the X (roll) axis. As a result, every other instanced mesh is rotated 90 degrees.
@h3llspreader Жыл бұрын
Thank you so much, this is exactly what I was trying to do!
@Fafmagic3 жыл бұрын
Love this tips & trips series
@williamlacrosse93893 жыл бұрын
Straight to the point. I want more...
@MagnumN1179 ай бұрын
This was a spectacular step-by-step tutorial, thank you so much!
@himanshudas90423 жыл бұрын
Can you please continue this type of tips and tricks series
@Kevoin_6 ай бұрын
If you want rotation per instance you can place a "Combine Rotators" node before the "Make Transform" node and promote the "B" section to a variable to make it controllable from the editor.
@fleurbird3 жыл бұрын
This is so clean and helpful. In less than 12 minutes I learned so many things. Thanks!
@Flowrazornapalm2 жыл бұрын
Fast, on point and way too confusing for me.. but you are a LEGEND, works like a charm
@DragonplayerDev3 жыл бұрын
Oh wow this is exactly what I was looking for a few days ago.
@jynxbot35210 ай бұрын
Adding this for any troubleshooters out there that may need this too while I was fiddling with it, as I'm pretty new to Blueprints. If you wanna Make your mesh follow the orientation of the spline but want your mesh to always point upwards, for instance I was making Spindles for a staircase and they should point upwards as they follow the spline up. To make them point upwards while following the spline, after the "get location at index" is added and you have that minus to subtract the first from the last, left click and split struct pin so you see X, Y, Z. On the "make Rot from X" do the same on the input, split struct pin, so you see XX, XY, and XZ. Connect the "-" output X to the XX input, and the output Y to the XY output. Compile. Your assets should be point up in world space while following the curve. Took a little fiddling to figure it out.
@nodezero98283 жыл бұрын
I needed this so much!!
@glenortiz8419 Жыл бұрын
Awesome video! very helpful and easy to follow! Wondering if you could do a follow up video with splines on how to add a function that will bend geometry along the curve together with the already existing elements on this blueprint. Again, awesome video can’t wait for the next ones
@jomesias2 жыл бұрын
Any way we can get a tool like blender’s array modifier? 🤞🤞🤞🤞
@Staglaitor Жыл бұрын
Thanks - maybe I overlooked it - but are there primitives from splines - such as: circle, square, ellipse, triangle?
@AruzOverrider_a-ruse Жыл бұрын
yes, you can right click and open spline generation panel
@MoinkAndKilo2 жыл бұрын
This was very well done. Very clean blueprints.
@michaelvaughan29862 жыл бұрын
can you instance blueprints along a spline?
@goroseitto6 күн бұрын
up
@wilismatrix9847 Жыл бұрын
I want to add an option where I can change or customize the rotation of a selected instance in the spline.3 because at some places the follow rotation puts some assets in not exact rotation that I need at at that specific place in the map ?
@foxxxtheworst Жыл бұрын
This is brilliant! HOWEVER: how could we implement a public variable to control the scale or size of the instanced mesh?
@aiarch2 жыл бұрын
it helped a lot. thanks. How can we add multiple meshes to it?
@ReverseAltruism2 жыл бұрын
2:05 Now what if you want to use more types of static meshes? :(
@ananya.s Жыл бұрын
Did you figure this out?
@goroseitto6 күн бұрын
up
@routeone4790 Жыл бұрын
I only get one mesh when I drag into the scene, how does he get multiple ones?
@Atl3m Жыл бұрын
How to snap them to landscape?
@gaming4K Жыл бұрын
But if you do it with a fence ar rail it doesn't connect the end points it's just following the line without connecting the meshes
@ianburke58673 жыл бұрын
More tips like this, please.
@moshmoshpitpit3 жыл бұрын
Amazing! Great job!!!
@justinboyd20211 ай бұрын
Am I missing something, I followed step by step, but after placing the BP into the scene (viewport), I cant see the spline and therefore cant extend it or curve it etc. Please help. At 6:57 something must be pressed in the video as the spline suddenly appears in the video?
@goroseitto6 күн бұрын
try hitting G
@PhilHarland-hz1pm5 ай бұрын
Awesome, just EXACTLY what I needed for my game as Construction Script in game is sooooo SLOW for stuff that never changes position!
@techgnosis36932 жыл бұрын
Excellent work thank you for sharing..!!
@artadecram_9624 Жыл бұрын
Thanks for solution! As we know -in common 3d-editor - like maya or 3ds max - we can smooth spline or rebuild it that means that instead 5 point inside we will get 10 ones - can we do it in Unreal engine? What operations can i do with spline in UE?
@keshavharipersad2024 Жыл бұрын
finally, a tutorial that isn't a zoom meeting and 3 hours long
@MuhammadFazrulMuhammadNadzri4 ай бұрын
Hello. Is this possible to be made dynamically? I intend to make a crane cable that can be extended or retracted using the same method, but i can only manipulate the spline distance during editor mode and not in game mode. I have created a lever where its input will be used to manipulate the spline so that the static mesh can be spawned when spline extended or removed when spline shortened - givin the visual of cable extending and retracting. However, I still do not understand on how to do it.
@CreativeGraham Жыл бұрын
Excellent video! Thank you!
@planet_asylum90593 жыл бұрын
Thanks alot this is a great tutorial! Is there a way to keep the pivot point on the BP centered? Mine seems to be very far from the instanced static mesh center and the spline.
@chadgtr34 Жыл бұрын
can it be camera actor for every 50 meters in the race track? camera actor instead of the tires, and through the camera actor, we can watch the car goes around the race track as a spectator or 'replay' after the race is finish.
@martinbalogh87685 ай бұрын
Great vid. Thanks
@BingGeaux Жыл бұрын
Thanks I found the correct node.
@joshuakop2 жыл бұрын
How do you rotate the static mesh on the spline? I need to rotate it 90 degrees but cannot figure it out. I'm a newbie.
@tutumannyAQUE8 ай бұрын
Life saver, thank you!
@harrygeorge3665 Жыл бұрын
im following this in ue5 and its just not working, do i need to do something with my mesh ?
@FabioHartFernandes Жыл бұрын
Hi... i am trying to use this technique to distribute some light poles over a highway... the instanced mesh worked perfect, but i cant figure out how to instance thee spotlights that ive attached to the pole... any hints how to do that? thanks a lot
@kellyvill9413 Жыл бұрын
Did you get a solution?
@FabioHartFernandes Жыл бұрын
not yet... maybe PCG is the answer @@kellyvill9413
@gamedevstanislove3 жыл бұрын
Thanks a lot! Very useful! Awesome!
@neonbeachgames Жыл бұрын
How do you get splines (fences, walls, etc.) to stick to the landscape? Not every road is perfectly flat ya know :)
@stargazestudios Жыл бұрын
It's been 3 months but for posterity: line trace under each mesh and set its location at the impact point. You can even use the Normal hit to set the rotation to follow terrain.
@ISDISNJH3 жыл бұрын
I am trying to model a theater style seating where one mesh has arm rest then the next one between it does not have armrest, I want to know how can I set it up so the spline uses two type of instanced meshes it spawns along the spline..
@mattoztalay57133 жыл бұрын
Yup! You'd use the sample spline, but you'd have two Instanced Static Mesh Components, one for the ArmRest and one for Armless. Then in the for loop you'd use the same transform each time, but FlipFlop between AddInstance to the ArmRest ISM and AddInstance to the Armless ISM. Alternately, you could model your chairs so they all have one armrest on the left side, then then you get to the final instance you can add an "end cap" single static mesh that's just the armrest.
@kenalpha32 жыл бұрын
@@mattoztalay5713 Whats the code to add [beginning and ] End cap meshes - calculated to match the end length of the last mesh?
@shakaama3 жыл бұрын
can I use this principle for a endless runner to both keep the spline going, and to put random street elements along the spline?
@_FLOROID_2 жыл бұрын
Theoretically you could use randomization in the for loop to randomly select a mesh that is instanced.
@maurofiamma2 жыл бұрын
How to use more then one static mash to do the same? Thanks
@ananya.s Жыл бұрын
Did you figure this out?
@goroseitto6 күн бұрын
up
@TheWinterShade Жыл бұрын
Hi, is it possible to import your own splines and use them for the same outcome? So instead of drawing it out, you import the spline and populate the mesh from the spline?
@hamzakilic784410 ай бұрын
Hi everyone, How can I merge splines in different landscapes?
@davidramis-us2 жыл бұрын
Is it possible to draw the line with your cursor at run time?
@NicoleSummer8 Жыл бұрын
Awesome!
@X-mordred-X3 жыл бұрын
Hey guys, I have this newbie problem. I've made a very similar system. My problem is that I can't mesh paint across all the instanced meshes. Can you help me?
@kenalpha32 жыл бұрын
Did you find an answer? We need the code for using regular meshes and not Instance. When I set my Instance mesh and place in world.. my editor gets super laggy. Idk if it's the polys or because it has a WorldAligned texture and 3 vertex layers. But this mesh + mat doesnt lag when I use another spline that uses non-instance mode. But his code has offset I need.
@X-mordred-X2 жыл бұрын
@@kenalpha3 No, I still can't paint across freely. The workaround is to expose components in the Details Panel... I don't know how I did that, and I can't find the guy who posted this solution. If you can expose each SplineMeshComponent in the Details Panel, you can just click one by one and paint them... this is far from being a solution but with a lot of patience you can get away with it. I'm using BP and SetStaticMesh per instance. Sorry I am not of much help.
@allieholmes21922 жыл бұрын
Im new to ue5 and following along has been amazing I was wondering how I would go about added something that bends the object along the spline but still allows me to add offset to the instances any help would be amazing :)
@artdrawing668211 ай бұрын
oh men thank you very much one thing if find somthing to the mesh deforme withe spline when rotation you k'now what i mean like spline landscape if do'it i this go to other levels any way thnk you
@DaroxxFR3 жыл бұрын
Are nanite meshes working with spline please ?
@Madamealexandria13 жыл бұрын
Yes definitely working as per Instanced Static Mesh in this video. They dont work as a spline mesh, as that deforms the geometry (not supported in Nanite)
@DaroxxFR3 жыл бұрын
@@Madamealexandria1 Thanks, you even answered my future question X)
@wasimsaifi76842 жыл бұрын
Time 3.39 what node you used?
@cosminzeic3 жыл бұрын
How can you resize the spline so the meshes fit right?
@rudenzu3 жыл бұрын
Hi! I am trying to move these meshes during gameplay by changing the shape of the spline, but all of the meshes move the same amount, even though I only move one spline point. How should I go about it?
@Radwalls Жыл бұрын
this video gave me a nosebleed. but im not going to give up
@squadukraine1112 жыл бұрын
Is it somehow possible to use blueprints in splines instead of static meshes? For example, I have a razorwire blueprint that slows users down and inflicts damage. I want to draw a spline where this BP will work all the way.
@gelubra44 Жыл бұрын
Im wondering aswell did you find out anything? Im trying to add box triggers along a spline.
@gaming4K Жыл бұрын
Can you make the things overlap? There are some meshes that an overlap is needed to look good.
@Soraphis91 Жыл бұрын
make the offset negative
@_FLOROID_2 жыл бұрын
Is there any way to add more control points to the spline, similarly to the way you can add new control points to splines in a spline layer in the landscaping tool?
@shouzhanma44162 жыл бұрын
关卡中 右键点击样条线,有一个在此处添加新样条点的按钮。Right click on a spline in the level and there is a button to add a new spline point here.
@aaronhesse Жыл бұрын
Rotation of the meshes doesnt work for me in UE 5.2
@ryanjstever Жыл бұрын
What about adding a light to the spline?
@kellyvill9413 Жыл бұрын
Did you work it out?
@cosmotect3 жыл бұрын
Are splines not really intended for single object, multi mesh solutions? (Like a plant generated along a spline) Because I run into issues with spline behavior in those cases
@Fafmagic3 жыл бұрын
The spline system just isn’t robust enough to manage branching. I’m sure it can be done but you’d probably have to extend the spline class in C++ or do some serious faffing about with multiple spines on a parent class. Frankly, I’d still use Blender to do plant and tree meshes.
@cosmotect3 жыл бұрын
@@Fafmagic not even going as deep as branching… The splines break down when you try to move them vertically. I can't get them to behave properly. I have tried a spline based waterfall and pipes
@hageby123jean13 жыл бұрын
If someone can answer... Should I learn and work with the C++ for Unreal? Or just stay with Blueprints?
@qq-pf9pn3 жыл бұрын
with blueprints you can do most of the stuff but if you want to work in a game studio or you probably will need to learn c++
@haroldseven86753 жыл бұрын
You never lose learning something new.
@nxwn91442 жыл бұрын
Nice tutorial,
@mo8802 жыл бұрын
Imagine a Hendrix in the comnt section said he was struggling and niggas said give up lmao.
@FromWithin5262 жыл бұрын
there is no float+float in ue5? so what would it be
@Mittzys2 жыл бұрын
Just +. It decides the variable type based on what variables you put into the inputs.
@Jet7Wave2 жыл бұрын
Just +. It doesn't require you to specify that it's float anymore.
@well.83953 жыл бұрын
Video on how to perfectly use MetaHuman on mobile platforms?
@hardway7773 ай бұрын
Thanks!
@BizzareArchAngel Жыл бұрын
great thanks!
@wasimsaifi76842 жыл бұрын
I can't find that node in UE5
@CamilleMeehan2 жыл бұрын
If you are referring to the float + float node, it is no longer variable specific. You can just use +
@klexxsy Жыл бұрын
How i can make a new point 😅
@buster5661 Жыл бұрын
You probably just extrude it
@rifat.ahammed2 жыл бұрын
Thank you
@Perry-wy2fc Жыл бұрын
😂😂😂 oh my god.. you do that in 3 clics in cinema 4D 😮
@LordLuigi_Rigs3 жыл бұрын
✅✅✅
@buster5661 Жыл бұрын
Feel like this is outdated with pcg's
@Bulborb1 Жыл бұрын
They sort of work in conjunction, just depends on your needs
@allashama7 ай бұрын
being someone with mathematical issue, this is overwhelming lol.
@borisstengele5389 Жыл бұрын
@jaybills46952 жыл бұрын
I'm kinda lost but i'm getting there. I'll try to motivate myself to learn all the complex tNice tutorialngs on tNice tutorials program and make so soft i'd like.
@ImadoPullupz2 жыл бұрын
It's too complicated there should be a simpler way to do this
@soundkaiser3 жыл бұрын
Oi!
@coffeediction Жыл бұрын
those barriers are not really lining up tho, if its a pipe or cable then RIP, im stuck, again.
@buster5661 Жыл бұрын
Thank you
@buster5661 Жыл бұрын
kzbin.info/www/bejne/fJ6yhKiqZc1poas
@I_Stern2 жыл бұрын
yup, got it, thanks. :D
@apollogt55063 ай бұрын
how can i use a spline to bend an object to make a pipe or staircase handrail? thanks