Move Objects Over a Spline - UE4/UE5 Tutorial

Поділитися
Вставка
  • Опубліковано 27 січ 2025

КОМЕНТАРІ • 177

  • @zorakbane
    @zorakbane Рік тому +37

    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 6 місяців тому +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 5 місяців тому

      @@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  2 роки тому +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 2 роки тому +14

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

  • @BrujeriasdePapel
    @BrujeriasdePapel 11 місяців тому +1

    Thanks!

  • @FuzzyMelox
    @FuzzyMelox 2 місяці тому

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

  • @TheHeshDev
    @TheHeshDev 6 місяців тому

    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.

  • @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.

  • @MADMOVIESINC
    @MADMOVIESINC 5 місяців тому +1

    Great video, Man! Thanks a lot!

  • @stundazepow
    @stundazepow 2 роки тому

    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.

  • @anatolio8689
    @anatolio8689 5 місяців тому

    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.

  • @lorenehue6244
    @lorenehue6244 11 місяців тому

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

    • @thegamedevcave
      @thegamedevcave  11 місяців тому +1

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

  • @rankot399
    @rankot399 3 місяці тому

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

  • @harvzgames9622
    @harvzgames9622 8 днів тому

    Iv got a rolling ball on a spline, what would should I do if I actually made it want to roll on the spline its self

  • @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!

  • @SalazarElefunk
    @SalazarElefunk 2 роки тому

    Great straight to the point tutorial

  • @ITAngel
    @ITAngel Рік тому

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

  • @rajimon5193
    @rajimon5193 6 місяців тому

    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%)

  • @3BEEZ
    @3BEEZ Рік тому

    Brilliant Tutorial.

  • @muhammadhuzaifa2441
    @muhammadhuzaifa2441 27 днів тому

    why did you put a divide node between instead of connecting timeline length variable directly to playrate? @06:19

    • @thegamedevcave
      @thegamedevcave  27 днів тому

      the timeline curve we make is on a 0-1 scale. so if we play it at normal speed it lasts 1 second. but by doing 1/DesiredLength we get a playrate to apply. Solet's say we want it to take 20 seonds. we then get 1/20 = 0,05. meaning that the timeline will play at 0,05x speed. this is just a more user friendly and intuative way to set timeline lengths comaped to messing around with the actual curve inside the timeline

  • @xxspecterxx
    @xxspecterxx 11 днів тому

    my actor doesn't move and i get a bunch of cant find rotation errors

  • @alexanderbulkin1490
    @alexanderbulkin1490 Рік тому

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

  • @mirceam7152
    @mirceam7152 Рік тому

    Thank you so much for this!

  • @aethylwulfeiii6502
    @aethylwulfeiii6502 2 роки тому

    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  2 роки тому

      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.

  • @squadukraine111
    @squadukraine111 4 місяці тому

    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?

  • @TimothyChen-z2z
    @TimothyChen-z2z Рік тому

    super helpful thanks mate

  • @devlogerio
    @devlogerio Рік тому

    Works like a charm

  • @_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

  • @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?

  • @ClydiieTwo
    @ClydiieTwo 2 роки тому

    This is amazing! Thank you subbed!

  • @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

  • @tlzbedoingstuff
    @tlzbedoingstuff 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

  • @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.

  • @fl260
    @fl260 Рік тому

    Thank you good sir, I subscribed.

  • @ZarrosUE5
    @ZarrosUE5 8 місяців тому

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

    • @thegamedevcave
      @thegamedevcave  8 місяців тому

      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.

  • @lordkanesoulreaver
    @lordkanesoulreaver 2 роки тому

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

    • @thegamedevcave
      @thegamedevcave  2 роки тому

      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

  • @stevecavanagh8033
    @stevecavanagh8033 2 роки тому

    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 :(

  • @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...

  • @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.

  • @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

  • @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.

  • @silvanobaronm.3355
    @silvanobaronm.3355 Рік тому

    You save my life. Genio, gracias

  • @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.

  • @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 : ua-cam.com/video/I7vg-WXBtXY/v-deo.html

  • @andromenosan5622
    @andromenosan5622 2 роки тому

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

    • @thegamedevcave
      @thegamedevcave  2 роки тому

      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 2 роки тому

      @@thegamedevcave
      Thanks! I'll try this)

  • @manicdistopia2502
    @manicdistopia2502 2 роки тому

    awesome video thanks

  • @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 :)

  • @flathmann
    @flathmann 9 місяців тому

    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 9 місяців тому

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

  • @vallebreno
    @vallebreno 2 роки тому

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

    • @thegamedevcave
      @thegamedevcave  2 роки тому +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 2 роки тому

      @@thegamedevcave thanks for the reply

  • @subhamsharma8290
    @subhamsharma8290 2 роки тому

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

    • @thegamedevcave
      @thegamedevcave  2 роки тому

      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

  • @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

  • @FearsMods
    @FearsMods Рік тому

    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  Рік тому +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 6 місяців тому

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

  • @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.

  • @yurimolfarUA
    @yurimolfarUA Рік тому

    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  Рік тому

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

  • @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 :)

  • @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.

  • @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 :)

  • @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

  • @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

  • @gergo01
    @gergo01 2 роки тому

    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  2 роки тому

      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 2 роки тому

      @@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.

  • @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)

  • @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.
      ua-cam.com/play/PLoReGgpfex3x1Tmkru1QyTB0pXiWASj5M.html
      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

  • @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.

  • @OmmegaTang
    @OmmegaTang Рік тому

    Merci mon reuf je t'aimes

  • @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! :)

  • @BrujeriasdePapel
    @BrujeriasdePapel 11 місяців тому

    Thanks a lot. but my character move so quick

    • @thegamedevcave
      @thegamedevcave  11 місяців тому

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

  • @maksim5109
    @maksim5109 16 днів тому +1

    thanks, but it's a bit complicated. Here's a video where half as many nodes are used, but the result is the same.
    ua-cam.com/video/n9Y6EGLEjZo/v-deo.html it is not my video)

  • @pnvgordinho
    @pnvgordinho 5 місяців тому

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

    • @thegamedevcave
      @thegamedevcave  5 місяців тому

      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 5 місяців тому

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

  • @orenders
    @orenders 10 місяців тому

    extremally bad guide

    • @thegamedevcave
      @thegamedevcave  10 місяців тому

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

    • @orenders
      @orenders 10 місяців тому

      @@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  10 місяців тому

      @@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!