Move Objects Over a Spline - UE4/UE5 Tutorial

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024
  • НаукаНаука

Комментарии • 172

  • @zorakbane
    @zorakbane Год назад +35

    instead of trying to position and rotate your last spline point just select the "Closed Loop" property on the spline component

    • @thegamedevcave
      @thegamedevcave  Год назад +13

      my god this is great! no idea how I overlooked that but I'm pinning this comment so everyone can see!

    • @MichaelTintiuc
      @MichaelTintiuc Год назад +1

      To make this work you'd have to change your code from using the last spline point to SplineComponent->GetSplineLength(). Otherwise the current implementation will not take into account that the first point is also the last.

    • @pedrogomes693
      @pedrogomes693 5 месяцев назад +1

      For anyone that attempts this change just make sure the "Get Number Of Spline Points" doesn't have the subtraction node after it anymore. There's no need to subtract 1 since the first and last point aren't overlapping anymore.

    • @anatolio8689
      @anatolio8689 4 месяца назад

      @@pedrogomes693 actually when I removed the - 1 the spline object jerked into position every loop. When I added the - 1 back in the loop was smooth. But I still have "Closed Loop" checked. I also positioned my start/end spline points as the video instructed, just by matching the locations, which isn't hard at all.

  • @thegamedevcave
    @thegamedevcave  Год назад +4

    To anyone who is having trouble. without seeing your blueprint graph I have no idea what is going wrong with your setup. Join the Discord in the video description and drop a screenshot in the "unreal" channel. there I will try to help you troubleshoot

  • @Zinkquer
    @Zinkquer Год назад +13

    this is like watching a math guide i don't know what i'm doing but it's working

  • @FuzzyMelox
    @FuzzyMelox Месяц назад

    Simple, straight to the point, good speed. Fantastic tutorial mate, appreciate it.

  • @TheHeshDev
    @TheHeshDev 5 месяцев назад

    Thank you so much for this easy to follow tutorial, I am working on a Shooting range for my test level, I had it setup that once the dummys were destroyed a door opens. With this I now have them setup to look more like a traditional Target Range.

  • @BrujeriasdePapel
    @BrujeriasdePapel 10 месяцев назад +1

    Thanks!

  • @anatolio8689
    @anatolio8689 4 месяца назад

    Thanks! Perfect.
    For anyone having issues with the spline object not completing the loop, make sure in the timeline you are setting the values (0, 0) and (1, 1). Double check it isn't something like (0.5468, 1) somehow that happened to me.

  • @storeboughtrocketgames2560
    @storeboughtrocketgames2560 Год назад +1

    Pro tip, connect the update execution pin to set actor location, otherwise it just looks weird when the actor sits there and spins. I literally sat there for like 5 minutes trying to understand what I did wrong before I re-watched the video and noticed I didn't have that execution pin set. Great tutorial! Subscribed.

  • @squadukraine111
    @squadukraine111 3 месяца назад

    Can I apply an effect to the actor when it's moving down the spline? For example, I want to make it invisible at the beginning of the spline and then make it visible again after 10 seconds? Is it possible with the example from the video?

  • @rankot399
    @rankot399 2 месяца назад

    how do I make a mission where I chase the enemy along a pre-defined path, where the enemy jumps over obstacles and runs?

  • @stundazepow
    @stundazepow Год назад

    This is very good. I put the spline inside the drone I was testing, so Actor, and GetActorLocation/Rotation, became Skeletal Mesh, SetWorldLocation/Rotation, and it works as it should. Thank you for a very clean tutorial. It takes a lot of trial and error to make a video game.

  • @MADMOVIESINC
    @MADMOVIESINC 3 месяца назад +1

    Great video, Man! Thanks a lot!

  • @prod.tlz_
    @prod.tlz_ 2 года назад

    In 1:22 you skip the node you type. I cant find this one. Can you say wich one it is?

    • @thegamedevcave
      @thegamedevcave  2 года назад

      that's the custom event I just made before that so what that node is called depends on what you call your custom event

  • @lorenehue6244
    @lorenehue6244 10 месяцев назад

    Hi, if you want have a Timeline loop, you can use the node "Set Looping".

    • @thegamedevcave
      @thegamedevcave  10 месяцев назад +1

      that's a much better way than what I do here, thanks for pointing it out!! xd

  • @rajimon5193
    @rajimon5193 5 месяцев назад

    not sure if anybody knows how to do this, but im trying to only play my mesh along the spline 1 time, then update the location/rotation of the mesh to the final position/rotation. i can get the animation to work, but at the end of the animation my mesh jumps back to the start. btw, im animating everything from the sequence using a trigger for the bp.

  • @rudy552
    @rudy552 Год назад

    I redid the tutorial but it doesn't work when I do play and on my time line I have (time line paused @ 0.00s 0.0%)

  • @aethylwulfeiii6502
    @aethylwulfeiii6502 Год назад

    Is anyone else having the problem where their actor is sperging out in one place? I have tried adjusting the instance editable variables to speed up or slow down the animations but this does nothing?

    • @thegamedevcave
      @thegamedevcave  Год назад

      I'm not sure what would cause that problem. feel free to join the discord server linked below the video and send some screenshots of how you have things setup, maybe I can spot the issue that way.

  • @GuyChan3
    @GuyChan3 Год назад

    Is it possible to also have the spline move? For example, the spline slowly moves downward while the object follows the spline.

    • @thegamedevcave
      @thegamedevcave  Год назад

      Should be able to yeah, i haven't tested it out but in theory you should be able to animate it in the sequencer and have it still work. it might do some weird things the placement though since animating it like that also changes the length

  • @ZarrosUE5
    @ZarrosUE5 7 месяцев назад

    Is it possible to make it the other way around? Making a spline follow the object?

    • @thegamedevcave
      @thegamedevcave  7 месяцев назад

      i'm not sure what you're looking for with that. you want to generate spline points on the same location as a mesh?
      or do you want to make a spline that follows the shape of a mesh? because the latter is one of those things that sounds pretty easy to do for a human but telling a computer how to do it would be a massive pain and probably not great for performance if youre doing it in real time.

  • @edenscott3200
    @edenscott3200 Год назад

    My actor does not move at all, checked multiple times if my blueprint is the same, maybe you can not choose "anything" as an actor at the end?

    • @thegamedevcave
      @thegamedevcave  Год назад

      any object in the world is an actor so as long as your object variable is an actor variable, that can't be the issue. if the actor isn't moving when you run the game (it wont move when the game is not playing) and you're 100% sure the blueprints match maybe the speed variable is set to 0?

  • @flathmann
    @flathmann 8 месяцев назад

    Amazing, thank you!
    I still got a question; How can I change the speed over time? At the beginning I want to make my object move kind of slow, while I want it to move pretty fast in during the end.

    • @flathmann
      @flathmann 8 месяцев назад

      Nevermind, I found out you can just adjust the curve in the "timeline" node, which makes it pretty accurate

  • @MrAlexramos8485
    @MrAlexramos8485 2 года назад +1

    Great tutorial, really thorough. I did run into a slight issue I can't seem to resolve. My actor's rotation is running sideways along the spline is there a way to adjust the rotation of the actor so that the "front" is pointing in the direction of the spline movement? thank you!

    • @thegamedevcave
      @thegamedevcave  2 года назад

      Your actors mesh local rotation is probably facing the wrong direction, you could try to change it in that actors blueprint, if it happens with ALL your actors, you can just add 90 degrees to the Z rotation with a vector+ vector node

    • @hiphopshot1050
      @hiphopshot1050 2 года назад

      @@thegamedevcave ok cool the idea i have is to try to create a 3D text with a holographic material rotating around a building.

  • @illimitable
    @illimitable Год назад

    anyone know how to animate spline element count in the level sequencer?? theres no add keyframe button next to it and the splineelementcount is nowhere to be found in the sequence editor

    • @thegamedevcave
      @thegamedevcave  Год назад

      I'm not sure that'd be possible. you could potentially try to make an event in the blueprint that adds one and calling that through the sequencer instead.

  • @stevecavanagh8033
    @stevecavanagh8033 Год назад

    I learned a lot, thanks. Next step: to find how to make the player character go along a spline. If I choose that actor with this it gets really unhappy.

    • @MECLOCO
      @MECLOCO Год назад

      Did u find how to do it? Im traying the same but with not success, I change the Actor variable to get the pawn, it snpme into the start of the spine but then it doesnt move :(

    • @stevecavanagh8033
      @stevecavanagh8033 Год назад

      @@MECLOCO Yeah I got that too. Haven't got back to it since then :(

  • @armannasr3681
    @armannasr3681 Год назад

    I have a question about this method. If you don't close loop the spline, will the actor respawn at the starting point of the spline after reaching the end point of the spline? or will the whole thing not work

    • @thegamedevcave
      @thegamedevcave  Год назад

      yup you got it right! if you dont close the spline it will just travel to the end and then teleport back to the start! (important to note that it doesn't respawn really, it just teleports so it's still the same instance, not a new one. for the most part that wont matter but if you're doing something with an actor that has ammo or something, keep that in mind)

    • @armannasr3681
      @armannasr3681 Год назад

      @@thegamedevcave Great, I tried this and it worked perfectly. My only other question is that, this works in Play mode, but not in realtime mode when editing, is it possible to make it move in realtime mode as well? similar to clouds and trees and stuff. my end goal is to create sequence animation from this moving object.

    • @thegamedevcave
      @thegamedevcave  Год назад

      @@armannasr3681 no, because this works on tick, it only runs during actual gameplay, not just in the viewport, moving trees and clouds are shader effects, which is why they work outside play mode in the viewport too.
      you can however put this blueprint into the sequencer and instead of using the math in event tick to set it's position, simply animate the position via exposed variable in the sequencer, that might take a few changes to the blueprint though.

    • @armannasr3681
      @armannasr3681 Год назад

      @@thegamedevcave
      Thanks for response. I have done this with attaching actor to camera rig in the sequencer, but your method is much easier to do for multiple objects. Do you mind elaborating on how to animate the position with variable in sequencer?
      Thanks In advance.

  • @behemoth775
    @behemoth775 2 года назад

    Hello, good video. But I have a problem, I followed all the steps but once I place an actor into the spline line it moves the way the path was drawn but outside the actual path. Did I do something wrong with the actor location? I don't really know how to fix it.

    • @thegamedevcave
      @thegamedevcave  2 года назад

      it's most likely because the pivot point of your mesh is in a weird place. you can test that by just putting the mesh in a level and trying to rotate it. does it rotate around a weird place instead of around itself? if so , that's the issue. I dont know where you got your mesh from of course but in blender you can change it around in a couple of different ways.

  • @alexvith
    @alexvith 2 года назад +1

    Hi, great tutorial! Is it possible to have the animation start from a sequencer trigger? I've been trying to get an object to move along a spline for a cinematic sequence but I can't seem to make it work.
    UPDATE: I did make it work, but it only works if I hit play, which is still not the best solution. Is there any way to make this technique work or should I look for something else? Thanks.

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      you can start custom events from the sequence so if you hook this system up into a custom event instead of begin play that should do the trick. though i'm not 100% sure you can make objects move over a spline like that in the viewport when the game itself isn't running so you might be better off just animating the position of the object instead of trying to work with this spline system inside a cinematic like that.

  • @yurimolfarUA
    @yurimolfarUA 11 месяцев назад

    thank you for the tutorial
    if my actor has animations, etc (tank from vigilante content), is it possible to make it act like it is driving realistically by this spline?

    • @thegamedevcave
      @thegamedevcave  11 месяцев назад

      sure your actor can do anything it usually would, including animations while it's moving along the spline

  • @_MaxSky
    @_MaxSky Год назад

    why does the object jerk up and down when moving along a straight spline?

    • @thegamedevcave
      @thegamedevcave  Год назад

      you probably have gravity enabled in the physyics settings

    • @_MaxSky
      @_MaxSky Год назад

      ​@@thegamedevcave Thanks ... I had "Simulate Physics" enabled on actor

  • @mohamedabelaziz6239
    @mohamedabelaziz6239 Год назад

    Thanks for the tutorial. How can I add more than one object to spline and they have different starting points ? I want to make esclator with that

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      I made an updated tutorial that allows for multiple actors on a spline with an offset between each one recently you can check that out here : ruclips.net/video/I7vg-WXBtXY/видео.html

  • @FearsMods
    @FearsMods 11 месяцев назад

    I noticed you reply to all of your comments, and I am hoping that's still the case haha.
    I am running into an issue, when I "destroy" the actor that's assigned to the spline path, I get errors. It seems the spline blueprint is trying to grab the destroyed actor that is no longer in play. Is there a way to cancel the timeline if it can't access the actor?
    Thank you.

    • @thegamedevcave
      @thegamedevcave  11 месяцев назад +2

      use the IsValid node (the macro one, comes up as a question mark icon in the list i believe) it should have 2 outputs, one for when a variable you put into it is valid and one for if it's not valid. only run the code in the timeline update if the object is valid (dont do it before the timeline, if you do it before, it'll only check once and if you destroy the actor mid timeline you're still going to get errors)

    • @TheHeshDev
      @TheHeshDev 5 месяцев назад

      @@thegamedevcave This Just saved me, Thanks !!!

  • @lordkanesoulreaver
    @lordkanesoulreaver Год назад

    go to were loop node is at and it dosent exist in my engon layout sadly for 5.1

    • @thegamedevcave
      @thegamedevcave  Год назад

      the for loop still exists in unreal 5.1, it's one of the most basic functions of almost any programming language. try to check if you're following along with the tutorial properly or if you maybe missed a step somewhere. it's likely you're trying to add the loop in your construction script instead of the event graph. that is indeed not possible

  • @nicolasdesola3332
    @nicolasdesola3332 2 года назад

    Thanks for the tutorial. How could I add more actors to follow the same spline? All starting with different delay, but visible at the same time? Thanks.

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      to get that working you'd need to modify a fair few parts of this. changing the actor variable to an array, adding a float variable for the distance between every actor and then use a for each loop to move all the actors in the array around. there's probably a bit more to it but that's the basic idea to make it work with more actors :)

    • @DavidConstance
      @DavidConstance 2 года назад +1

      @@thegamedevcave would love to see this in blueprints. attempting a dark ride and would love all the "doombuggies" to be evenly spaced and moving along the same path

  • @borrowedtruths6955
    @borrowedtruths6955 Год назад

    I have a train locomotive following a train track spline, I then added another train car to the same track spline, both are BP's, but the second train car starts at the exact same place as the first one, the locomotive. Obviously, I need the second car to be connected to the back of the locomotive and follow it around the track, which I simply cannot figure out how to do.
    Any help or suggestions?
    Thanks in advance.

    • @thegamedevcave
      @thegamedevcave  Год назад

      you'll want to use an array instead of a single variable , then go through a for each loop with that array and use the index to multiply an offset value. it's a rather common question and bothersome to explain over just text so I intend to make a followup tutorial on just this topic sometimes the next couple of weeks.

    • @borrowedtruths6955
      @borrowedtruths6955 Год назад

      @@thegamedevcave Thanks, I really appreciate it. You just earned a new subscriber.

    • @thegamedevcave
      @thegamedevcave  Год назад

      @@borrowedtruths6955 if you need help faster than that feel free to join the discord server and when i'm around I'm happy to help you (especially with blueprint stuff, it's easier if you can send back and forth screenshots ;) )

    • @borrowedtruths6955
      @borrowedtruths6955 Год назад

      @@thegamedevcave Can't seem to get into discord for some reason. I tried to reply to your email, but it said the address was not there. When you have the time, I could really use an image of the needed blueprint to make this work. Thanks again for your time.

    • @thegamedevcave
      @thegamedevcave  Год назад

      @@borrowedtruths6955 i'm not sure what Email that would be? strange that you can't get into the discord though. i'm not sure how to help you with screenshots otherwise...

  • @subhamsharma8290
    @subhamsharma8290 Год назад

    Thanks for the tutorial. How can I pause the movement with a Keybind during gameplay and also resume ?

    • @thegamedevcave
      @thegamedevcave  Год назад

      to start and stop you can simply add a bool variable and use a branch to only do all this when that bool is true, then setting the bool to true or false depending on your input , or whatever else you want will make it start and stop moving

  • @manicdistopia2502
    @manicdistopia2502 2 года назад

    what if you wanted it to move without hitting play- sort of like how fire works from the stater particle pack

    • @thegamedevcave
      @thegamedevcave  2 года назад

      I dont think you'll be able to move objects around like that before beginplay

  • @gumbahasselhoff
    @gumbahasselhoff Год назад

    Thank you, very helpful tutorial. Is it possible to make an actor move at a fixed speed regardless of spline lenght?

    • @thegamedevcave
      @thegamedevcave  Год назад

      you'll have to change a fair few things around to the point where it's a whole different setup.
      in short what you'd do is have you speed varaible * deltatime added to a float every tick. then use that float to find the new position along spline. then check if the float isn't larger than the spline length. if it is, reset it to 0. taht way they'll move based on speed instead of distance.

    • @gumbahasselhoff
      @gumbahasselhoff Год назад

      @@thegamedevcave Thanks a lot for the fast answer. I'm not sure if I can do this with my limited knowledge, though.

    • @gumbahasselhoff
      @gumbahasselhoff Год назад

      @@thegamedevcave Actually I think I solved it! I substituted the "1,0/Timeline Lenght" Part with a "Speed Variable/Get Spline Lenght" and in a few tests it always does what it is supposed to.

  • @andromenosan5622
    @andromenosan5622 Год назад

    Good tutorial! But can you help to add deformation of the model while moving along the spline?

    • @thegamedevcave
      @thegamedevcave  Год назад

      i think using a spline mesh instead of a static mesh should allow for that. i'm not super sure how exactly that works right at this moment though, it's been a while since ive done that

    • @andromenosan5622
      @andromenosan5622 Год назад

      @@thegamedevcave
      Thanks! I'll try this)

  • @antonio_Env
    @antonio_Env Год назад

    Nice tutorial thanks, I'm subscribe! One question, if i want to have more than one object like a train with some wagon's there is a way using these method?

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      you'd need to modify things a little, if you use an array instead of a single variable, you can set the position along the spline in a for each loop with a certain offset between every index of the loop, that will effectively create a train-like system.

    • @antonio_Env
      @antonio_Env Год назад

      @@thegamedevcave Thank's i will follow that tip.

  • @DavidConstance
    @DavidConstance 2 года назад

    How do you set another object to follow the first? Or a complete circle of evenly spaced couches? (thinking the track of Disney's Haunted Mansion)

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      i've been getting this question a lot lately, it's a bit more complicated to make that work so i'llt ry to make a followup tutorial when i can!! it'll take a little while most likely though, for now, in your event tick do all that you see in this tutorial in a for each loop instead with an object array instead of variable as it's input, at the nodes where you find position along spline at a certain length, add an offset value to the spline length there . multiplied my the array index(+1) , also check if that results in a number that's longer than the spline length, if so : subtract the spline length from this number so it loops properly.
      i know it's a bit hard to follow along with text, a followup video will come but not for a little while

    • @DavidConstance
      @DavidConstance 2 года назад

      @@thegamedevcave I think I found a solution. Could I message it to you somehow?

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      i'm glad you managed to make it work. you're always free to join the discord server linked below in the description to share your findings :)

  • @mrgreatjob
    @mrgreatjob 2 года назад

    Hello thanks for making this was looking for a updated tut on this and got my camera on there, However the big thing I can not figure out having been researching and experimenting all day, is how to have the object moving along the spline actually generate a overlap event? I have tried creating different triggers, objects/actor , making sure all or set to (overlap All) the trigger object and the object on (or you could say the component that is set to move along the spline.) But it will not trigger tried simulating and seeing if there is break, nothing continues running I just don't know. I even tried changing the component there to just a mesh, collision sphere, still no overlap event is triggered. If you have any suggestions I would be thankful. I am using a (Play animation function) that seems to work fine if I use a event to trigger, like onbegin play or something.

    • @thegamedevcave
      @thegamedevcave  2 года назад

      that's a good question. are you moving a component over a spline with both in the same blueprint? if so, it might be the case that the component wouldn't generate overlap events if the actor isn't moving or something (that shouldn't be the case but that's the best I can come up with without knowing al the ins and outs of the project of course).
      if that's the case, using a system like i do in this video where the object moving over the spline isn't just a component but a whole separate actor, might fix the issue. otherwise i'm not sure what the issue could be.
      for debugging purposes it's always a good idea to see if events trigger by putting in a print string before/instead of the actual node youre trying to use, as that way it's very easy to see if the event triggered, because if it does you know at least that part works and can then focus on finding the problem in a slightly narrower search. (though, by the sounds of it, it DOES sound like the event is just not triggering in this case indeed, still, always good to double check that)

    • @mrgreatjob
      @mrgreatjob 2 года назад

      @@thegamedevcave I will be redoing exactly as you did tonight when I get off work and experimenting more. Thanks for the response. If successful will leave update.

    • @mrgreatjob
      @mrgreatjob 2 года назад

      Oh and the project is just trying to do fly through and have animations trigger when the object passes through that section. Pretty much like those old hunted house rides I guess? if you want to see look here but may want to mute the audio. "avantegarde" www.twitch.tv/videos/1520859936

    • @mrgreatjob
      @mrgreatjob 2 года назад

      @@thegamedevcave Your pathing worked perfectly of course, the overlap issue I had turned out I was able to resolve by making the object that will be attached to spline path a Actor and giving it separate collision component that will deal with that interaction.

    • @thegamedevcave
      @thegamedevcave  2 года назад

      @@mrgreatjob im glad you were able to figure it out!!

  • @tarekwayne9193
    @tarekwayne9193 Год назад

    Do you think it is possible to interpolate physics (without spline) movement with spline movement at runtime? I hope I worded that clearly, thx in advance and for video!

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      probably not to be honest. the whole idea here is you're setting the position directly every frame instead of letting physics move it around. combining the 2 usually doesn't really go very well together. you'd have to program your own pseudo physics moment.

    • @tarekwayne9193
      @tarekwayne9193 Год назад

      @@thegamedevcave thx for your swift response! Yh, the idea isn't very logical/practical!

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      @@tarekwayne9193 something else i touvght of that might help you depending on your usecasse is only setting the X and Y positions and setting the Z position equal to GetActorLocation.Z . that way it won't get stuck to the spline in the up and down direction, so that would allow for gravity at least, but it will still follow the path in the 2 horizontal directions.

    • @tarekwayne9193
      @tarekwayne9193 Год назад

      @@thegamedevcave I had something like that in mind also! I also wanted to try out the exact opposite, with the Z axis, precisely to keep the car glued to the track!
      Maybe turning the gravity off?

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      @@tarekwayne9193 I would say you for sure gotta turn the gravity off yeah. I'm not 100% sure on the math, i'd have to play around with it but what I think i'd do is whenever your player collides with a car, have the car check if it's being hit from the left or the right, and add or subtract to a float value. then use that float to add a horizontal offset to the left/ right from the spline.
      You probably could do that with getting the position along spline in local, then adding that float value to either the X or the Y value of that , and then converting that to global position to set your car to that.
      Otherwise you'll have to mess around with calculating it based on the spline's tangents and adding the offset to that perpendicular to the tangent (which is where I start to be unsure of how I would ACTUALLY implement that... but I think the calculating things in local space first would probably be possible and much easier anyway)

  • @plasid2
    @plasid2 2 года назад

    Yestarday I see tutorial about paint on skeleton mesh using render target, you thing its possible the same thing on spline mesh?

    • @thegamedevcave
      @thegamedevcave  2 года назад

      I am not sure but I assume it should be!

    • @plasid2
      @plasid2 2 года назад

      But how take UV texture from all spline and save it to square 2048x2048? Any idea maybe you make tutorial for this

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      I will have to look into it, I plan on making a followup to this video soon where I add train tracks to this system, so maybe that will be helpful for what you need :)

  • @ksenja.
    @ksenja. Год назад

    Thanks for the tutorial! It works like a piece of cake :3 And I was wondering why setting timeline length doesnt affect speed of moving. Turned out I didn't connect Event Play with Set Play Rate nodes. Debugging is a thing

    • @thegamedevcave
      @thegamedevcave  Год назад

      it's easy to overlook simple things! glad you figured it out :)

  • @vallebreno
    @vallebreno Год назад

    There is a way to make the object to rotate randomly?

    • @thegamedevcave
      @thegamedevcave  Год назад +1

      sure, instead of setting the rotation to the spline tangents you just replace that with another bit of script that sets a rotation at random at begin play and it'll have a random rotation. if you want it to move it's rotation randomly, that's a little more complex though. .

    • @vallebreno
      @vallebreno Год назад

      @@thegamedevcave thanks for the reply

  • @vikbricks5894
    @vikbricks5894 2 года назад

    Great video. Can this also be used to move trains along the track?

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      That’s exactly the kind of thing this is useful for!! :)

    • @vmunozbe
      @vmunozbe 2 года назад

      @@thegamedevcave tnx for the video. I´m trying to do exactly the same but for a train. How I add more wagons? any help??

    • @thegamedevcave
      @thegamedevcave  2 года назад

      @@vmunozbe there are many ways to do something like that. the most straightforward way is to add some sort of offset and have each cart use a larger offset. you could make a more robust system for that but that would be a whole tutorial on itself

  • @SalazarElefunk
    @SalazarElefunk 2 года назад

    Great straight to the point tutorial

  • @murnoth
    @murnoth 2 года назад +1

    This one earned you a sub. Thanks for the coherent content

    • @thegamedevcave
      @thegamedevcave  2 года назад

      thanks! Hope I can be helpful going forward!

  • @ITAngel
    @ITAngel Год назад

    Nice great tutorial and I never knew about this so good to know now.

  • @hiphopshot1050
    @hiphopshot1050 2 года назад

    How would you apply this to 3D text 🤔🙏✌️

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      your 2D text should function the same as any actor I think so this should work without any major modifications to the script.

    • @hiphopshot1050
      @hiphopshot1050 2 года назад

      @@thegamedevcave ok cool thank you because im trying to create 3D text with holographic material rotating around a building using your spline Blueprint. So i like to alos thank you for that

  • @mirceam7152
    @mirceam7152 11 месяцев назад

    Thank you so much for this!

  • @alexanderbulkin1490
    @alexanderbulkin1490 Год назад

    Thanks, i enjoyed to listen and learn from video! :)

  • @3BEEZ
    @3BEEZ Год назад

    Brilliant Tutorial.

  • @henrycooper8486
    @henrycooper8486 2 года назад

    Great tutorial thanks a lot for this! :) Would it be possible to have random objects move along the same spline? If yes how would you do it? Cheers :)

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      there is a couple of ways you could do this, you could make an array and at begin play pick a random entry from the array to set as the actor to move over the spline. that way you can just add 10-20-30, etc different actors it can choose from.
      or you could use "get all actors of class" at begin play to make that array for you so it automatically picks one actor of a certain type at random (in the same way as i listed above, just pick a random index out of that array).

    • @henrycooper8486
      @henrycooper8486 2 года назад

      Amazing thanks a lot! :)

    • @henrycooper8486
      @henrycooper8486 2 года назад

      Do you know of any tutorial that shows how to do that? I'm a complete noob and I wouldn't know how to do it, but I would be able to follow along :) Thanks :)

    • @thegamedevcave
      @thegamedevcave  2 года назад +3

      @@henrycooper8486 i'm not sure but i'll try to make a short tutorial showing it later this week!

    • @henrycooper8486
      @henrycooper8486 2 года назад

      You are amazing thank you so much for this! It is greatly appreciated! :)

  • @fl260
    @fl260 Год назад

    Thank you good sir, I subscribed.

  • @TimothyChen-z2z
    @TimothyChen-z2z Год назад

    super helpful thanks mate

  • @devlogerio
    @devlogerio Год назад

    Works like a charm

  • @TheHumanAnonymous
    @TheHumanAnonymous 2 года назад +1

    all of this just to move a character along a spline??? Idk how anyone uses Unreal, it takes like 4 clicks in C4D to achieve the same exact thing. So unintuitive it hurts

    • @TheHumanAnonymous
      @TheHumanAnonymous 2 года назад

      Nothing against the tutorial, just can't believe how over complicated it is to achieve such a simple task

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      I mean unreal is a game engine, that comes with way different expectations compared to 3D modeling or animation software. the whole idea is that any parameter in this can be influenced during runtime, where is in animation you're very carefully creating the 1 output you're looking for.
      simple example : let's say this is part of a boss fight where the boss is surrounded by turrets on a rail track and the turrets start to move faster as the boss loses HP to make the fight increase in difficulty.
      So yeah, it seems over complicated and in the end, you could probably get a pretty similar result with just throwing 2 keyframes onto a timeline and calling it a day (still a couple more clicks compared to C4D i'm guessing though) but it's a hard comparison to make.

    • @TheHumanAnonymous
      @TheHumanAnonymous 2 года назад

      @@thegamedevcave Yeah very true, I can understand that. Either way great tutorial and thanks for the help, just been a tough transition to another 3D program lol

    • @TheHumanAnonymous
      @TheHumanAnonymous 2 года назад

      @@thegamedevcave Is there an easy way to add banking/rotation to the character on the spline animation btw?

    • @thegamedevcave
      @thegamedevcave  2 года назад +1

      @@TheHumanAnonymous i totally get that, moving from blender into unreal was super overwhelming to me too. i'm not sure how deep in the learning process you are at this point but i also have a 6 part series going over some of the basics that might be helpful.
      ruclips.net/p/PLoReGgpfex3x1Tmkru1QyTB0pXiWASj5M
      as for rotation, the simplest way would probably be to just add a vector3 value to your characters rotation at the very end of the event graph , that way you can add X,Y,Z rotation to your actor after it's been lined up with the spline

  • @silvanobaronm.3355
    @silvanobaronm.3355 Год назад

    You save my life. Genio, gracias

  • @gergo01
    @gergo01 Год назад

    Doesn't works for me, at best moves to the first point. Yes, I did the Number of Spline Points - 1. I'm using the latest Unreal Engine 5.1

    • @thegamedevcave
      @thegamedevcave  Год назад

      well the issue will be somewhere else in the blueprint graph then. without seeing it, it's pretty hard to tell where the mistake is though. feel free to drop a screenshot in the discord server and i'll try to have a look at it if you haven''t found a fix yet.

    • @gergo01
      @gergo01 Год назад

      @@thegamedevcave I found it ... When setting up the Timeline, I'm sure I set points 0,0 and 1,1 - however checking back didn't saved exactly these 2 points, had to fix it again. Can't comprehend how it could happen this, for UE4 & UE5 I recreated these scripts and in all cases wasn't the 0,0 - 1,1 point pairs in the Timeline. Worth to keep in mind this thing with timelines ... might not save what they are given initially.

  • @ClydiieTwo
    @ClydiieTwo 2 года назад

    This is amazing! Thank you subbed!

  • @BrujeriasdePapel
    @BrujeriasdePapel 10 месяцев назад

    Thanks a lot. but my character move so quick

    • @thegamedevcave
      @thegamedevcave  10 месяцев назад

      make sure you set the variable for your timeline length (the float value) to a good number

  • @manicdistopia2502
    @manicdistopia2502 2 года назад

    awesome video thanks

  • @OmmegaTang
    @OmmegaTang Год назад

    Merci mon reuf je t'aimes

  • @pnvgordinho
    @pnvgordinho 4 месяца назад

    You could do this in a minute in blender and easier.
    Why does Epic make things so complicated?.

    • @thegamedevcave
      @thegamedevcave  4 месяца назад

      I guess because it’s not just for animation but making games so you’re working with real-time stuff.
      If you just want to make it animate over a spline manually about 80% isn’t needed

    • @pnvgordinho
      @pnvgordinho 4 месяца назад

      @@thegamedevcave Never the less, it should be easier and more intuitive to do.
      They should copy how 3d apps like blender work.

  • @orenders
    @orenders 9 месяцев назад

    extremally bad guide

    • @thegamedevcave
      @thegamedevcave  9 месяцев назад

      Hey, maybe instead of just being rude and complain, you could ask for help if you are having trouble. Just a thought

    • @orenders
      @orenders 8 месяцев назад

      @@thegamedevcave you cut sooooo much in video edit stage, to reproduce yours 1,5 min i spent 30 min to find buttons and menus. Im not happy to ask 100 questions to you.

    • @thegamedevcave
      @thegamedevcave  8 месяцев назад

      @@orenders maybe learn the engine a bit more first on a basic level then, I have a full playlist that goes over the basics too

  • @metatronorder3565
    @metatronorder3565 Год назад

    Awesome post...and after having watched a few, this one was so easy to follow/replicate...
    Being a nood to Unreal I do have a question though: I followed all the steps yet when I press play or shift the timeline cursor, my model makes the 'kessel run' in like 1 second...clearly..I've done something wrong...can anyone please help me to fix this issue? Thanks in advance and huge thank you to the Game Dev Cave for this post.

    • @thegamedevcave
      @thegamedevcave  Год назад

      assuming all your nodes are the same as mine, you made a float variable that is used to set the timeline's duration. you can edit that variable on the instance you put in your level (assuming you followed along and made it public) It's very likely you have that set at 1, meaning it'll make the whole loop in 1 second.

  • @rockstar745896
    @rockstar745896 Год назад

    thank you for the tutorial!