Where to start with my project

So looking at how you’ve set things up, you can nix splines for now. What you’ll do instead is:

Grab a Cylinder from the geometry tab on your main window and drag it in. They look like this:
image
NOT THIS>>>>>>>>>>>
image

These geometries can be modified to make your lines by using the Brush Editor.
image
image

You’ll want to modify the brush settings to size the width of the cylinder first, probably like .5 or something really low. Think “Pipes” instead of “lines”. :slight_smile:

image

You can check this documentation out on the brush editor to get the hang of it, and there are a TON of tutorials out there that use it, I’m just not sure of any specific ones.

Then you’ll just have them be dark or unseen normally and change to glowy when their connection is selected using emissive materials, which you’re rather familiar with now! :slight_smile:

Only had a quick look at this today, before I was asked to do something else, but I couldn’t find a way of making nice smooth curves, is that possible?

It just appeared to be scaling and connecting the different bits of geometry together, and that resulted in some jagged shapes (at least with what I was able to have a go at).

@PX54 I assume you mean something like this?

It takes a lot more work than you’d think but I can’t think of anything better to use for this project. There is very little covering this online, but I managed to find a 3 part video series using these.

Disclaimer: The recipient of this link is not affiliated with Epic or Unreal Engine in any way. Please click links at your own risk.:slight_smile:

Hello again, sorry for not responding quicker I was given some actual work to get on with last week.

I’ve watched the video you linked above, but again this appears to be how to move something along a specific path, this isn’t quite what I’m looking for unless it’s extending the objects’ size along the path rather than just moving it.

What I’m trying to do is when one of the boxes is selected, lines (or branches) extend from the box outwards to link up with the other boxes to which the selected one connects.
Those lines would remain visible between all points until another option is selected in the menu.

Say for example box 1 is selected and that connects to boxes 3,6,7 & 9. I would want lines that extend from box 1, through the empty space between the boxes and join up with the other 4.

Hey again @PX54!

The reason I sent that vid was more for the concept than anything. Getting curves like that can be very mathematically complicated for those non-geometry-inclined (like me! :stuck_out_tongue: ).

So what I’m seeing from your design here, you’re going to have to use decals, multiple decals at that (they’ll mesh very easily as just one line per decal, they’ll all look like one piece). You’ll want to have all the decals in an array. Then you’ll pull that array when needed, and get the index of the desired decals, and ForEach set the decals’ materials to an emissive color to light them up.

Something like: when 1 is clicked, we set the entire array of decals to be Black, THEN immediately after, set decal A(going from 1 to 7) and decal B(going from 1 to 3) to glow Green.

Edit: I’ve had a really good time with this thread, thinking creatively to help you make this from scratch. I feel like a consultant

I really appreciate all your help with this, it’s definitely been more fun than the tutorial courses I’ve paid for in the past

I don’t think I’m understanding what you’re suggesting, it may also be that I’m not explaining what I’m looking for very well.

So, (unless it can’t be done - which I doubt) I don’t want to see the connecting lines before anything is selected - there’s just empty space between all the boxes (which will be filled in design later on).
When something is clicked, I don’t want the lines to just show up from nothing, be that appearing or fade in fully connected.
I’m looking to create an animation where the lines grow from the selected box out towards the other connected boxes, like branches on a tree.
Spline_Anim

Then the lines will remain visible until the user selects another option (be that forward or backward).
Just so you’re aware of what I’m currently thinking of for the final design graphically. The boxes will represent different areas of a city, and the space between them will be roads, so these lines connecting them will be a sort of GPS route line that run along the roads when the different options are selected.

Okay, so it’s going to get complicated.

Splines for the roads seems like the right idea but then again I’m not sure. The decals idea with a sequence node seems like the best plan. So you’ll need to have variables for each bit of road, and then use a timeline and a sequence node to path things out.

However, I am thinking I’m completely wrong with how materials can be manipulated, which means the timeline/sequence combo would be for a spline. Materials (the decals) would be modified on their material graph. I couldn’t find a way to manipulate the decals as intended from an event graph.

I would suggest looking into a few fade tutorials, feel free to take your pick as there are many and they’re mostly identical. I think this is a situation where amassing knowledge will unlock the path forward. HOWEVER there is one thing I know we’ll have to figure out, and that’s getting the decal to fade from point A to point B, then immediately starting the next decal/s from point A to point B, and so on, and so on. I’m thinking local coordinates on the decals themselves will be used instead of just flat “X” and “Y”. It’s going to take some doing, this is a pretty advanced thing. I could help you fade them in and out, but doing like you say I’m unable to provide direct help, only direction :frowning:

So doing more looking into this it appears that what I want to do is called Morph Targets. This requires modelling a start and end point for my shape (the animated line) those two models will then be blended together to create the animation.

This requires the use of another piece of software like Blender or Maya to create the models and blend, then importing the FBX files into Unreal - I do have access to Blender, it just seems like a lot of work right now for what I’m doing, it may be something to come back to once I’m a bit more advanced.

So what I thought of instead would be an animation using the motion of multiple objects along the splines looped, creating something that looks like a ‘flow’ in the direction.
ezgif-3-6a08475290

Upon clicking the box/menu these splines will appear with the animated object moving along them on a loop.
Given what I’ve looked into so far I think this will be good option that while maybe more challenging than the simplest option, also gives a better visualisation of what I’m hoping to ultimately achieve

Edit:
I’ve found this post which at first glance looks to go through what I’m now looking for
https://forums.unrealengine.com/t/animate-multiple-objects-along-spline-conveyor-belt/617024
Found it at end of day though, so I’ll have a look at it properly tomorrow.

That looks like it will honestly be far simpler than what you were planning, even though it’s not exactly what you want, it seems like a great proxy in the meantime with far less time investment!

Ok finally got round to trying this today. I’ve managed to get it working but only on a single spline. If I make a new spline using the same blueprint as the first, only the first one plays, the second one shows the spline but not the animation.
Because there’s 4 different end points, and it’s not one continuous line I’d need 4 different splines (so far as I know)

  • One from Box 1 to Box 7
  • One from Box 1 to Box 3 (probably comes off the first line rather than at box 1)
  • One from the 2nd line to box 6
  • One from the 3rd line to box 9

It seems to work if I duplicate the first spline (i.e. all the lines animate) but I was just wondering why this is? Why it works when I duplicate the existing working one, but doesn’t work when I just add a new one.

So there’s 2 blueprints - one called Spline Path - this is the spline itself, and one called Spline Runner - this is the object that runs along the spline path to create the animation. Both are just made of cylinders.

This is the BP_SplinePath - I know I don’t need the array, because I’m not using different meshes, but I thought I’d leave it in, may come in handy down the line.
BP_SplinePath Components




This is the ‘Runner’

BP_SplineRunner Components
BP_SplineRunner FunctVar


The timeline is just a simple 0-1, the original video uses that as the loop, but they change it in the forum post above.

I’ve also noticed that my meshes don’t destroy when they reach the end immediately. They wait a good few seconds before doing so, so about 4 or 5 of them build up on top of each other before the finally start to disappear.
This will be a little annoying in the final version as I’ll need to run the spline longer and hide it under the floor rather than just be able to run it to where I want the end point to be.

All I need to know after that is how to make them appear and disappear using the widget buttons. I’m presuming there’s a way to activate and deactivate ‘Actor Hidden In Game’?
Edit:
I’ve found this thread;

Which I’ve been able to use on the Spline Path, but because the Runner isn’t an actor in the scene, it only spawns when played, how do I modify it’s actor tags to change if it’s hidden?

This comes off the ‘On Clicked’ event in the widget

Further Edit:
Think I’ve figured out what I need to do to hide the runner when the spline’s aren’t visible - but I don’t know what to change it to.

I’ve got the Spline Path event graph loop running from Event Begin Play, I don’t want this do I? I want the loop to start running when the widget is clicked (and stop when another button is clicked). So how do I connect the two blueprints so I can change it from Event Begin Play, to the relevant button click?

Whoa, you’ve been busy!

So I don’t remember if we’ve talked about it, but we need to use a Dispatcher. I think we talked about it a month or so ago!

We could also use a BP interface, if there will be several actors, which it seems like there will be, so maybe that’s the route you should go. If you want your instanced actors to be referenced, you’ll need to set them from the level BP on begin play (ON the LBP, you can’t reference the LBP from actors). So you would Get one Actor, cast it to what that actor IS, then set the variable you need to set, rinse repeat until everything can talk to each other through the references given by the LBP on their creation.

So I’m struggling with this part. I think I understand the concept, where you basically make a separate event/BP that multiple different blueprints can call externally and then they can ‘speak’ to each other through that event.

However I’m simply struggling to figure out how to get the instances of the Runner (object moving along spline) to speak with the Spline they exist on, so I can make them both visible/hidden at the same time.

I’ve watched a number of videos, but I can’t seem to connect the dots between what they’re showing to what I’m trying to do. I’ve yet to find one which details about instances which aren’t in the outliner on begin play.

So are you spawning these runners at runtime? What you can do is when the runner is spawned, you can give it the info for the spline it’s on BEFORE runtime. Then when the runner is spawned, you can tell it to grab the spline it’s on (because it’s already been set as a variable before game start) and tell that variable (the spline) to get its open variable for “Runner” and set it.

Does that make any sense?

It’s going to be something along those lines. However, without knowing how you’re spawning the Runner instances I don’t know how to point you in the exact direction you need :frowning:

Yes, they don’t exist until BeginPlay, they are spawned as part of the Spline code - the details of the Spline and the Runner are in my long post above
My Project - 12sec YouTube clip. I’ve zoomed in because I’ve got some company stuff shown on it which I don’t really want to disclose.

Edit:
Ok after a lot of trial and error, I’ve managed to make it so the Runners are not visible until you click the button; but there’s still issues.

  1. There’s a delay (only a second or so) between the splines becoming visible and the runners becoming visible I really want them to be simultaneous.
  2. All runners are visible rather than just the ones on the visible splines (as I sort of expected, because I’ve not found a way to differentiate them)
  3. Not sure how to turn them back off, when another button is pressed (i.e. going back/home in the menu) It just activates the code again and they reset to the beginning of their loop.

Interface
BP_Interface

Changes To Spline BP

Changes To Menu Widget

My Project (Again) - I’ve zoomed out a little here so you can tell when the menu changes down the left, so you can see what’s happening and when

Something you could try:

Have an event on your button that will Get All Actors Of Class> ForEach Loop > Destroy Actor(target is from ForEach). That way it will destroy your runners. Because you’re not hiding them, you’re spawning them, so you need to then destroy them either before spawning new ones or stopping them completely.

To get them to stop spawning, the Set Timer By Event node’s Looping variable needs to be set to False. I suggest adding another interface call that will set a boolean that will be hooked up to your Set Timer By Event, one that will set it to False all by itself, and you can have the “Event Hidden Runner” set it to True when you run it (before the timer starts).

To get specific ones to spawn the Spline objects need to be set into arrays somehow. Like “Button 1 is ABC, Button 2 is ACD, button 3 is BDEF” and so on, so you’ll only call those specific ones instead of all actors with that interface.

Hi, sorry for the long gap - more actual work to be getting on with.

My runners are being destroyed, at the end of the spline - it comes out of the ‘Finished’ on the timeline. Thing is they aren’t destroyed as soon as they reach the end of the line, but rather 4-5 seconds after that, so a bunch pile up at the end of the spline.
I’ve had to make it so the end of the spline is under the floor so they’re not seen by the user.

Ah, the Loop variable (the one thing I didn’t think to look at). I think I’ve managed to solve this then, by adding the Boolean variable like you said.


So now if they’re not running, they start on click and if they are, they stop on click. There’s not a point in the menu system (currently) where they need to be running on back to back clicks (there’s a few where they shouldn’t be running on back to back clicks), but I can just ensure the Interface BP isn’t added to those clicks to prevent any issue there.

Though again there is a delay of a second or two as the final one runs through but the splines themselves have already disappeared.
If I add the Destroy Actor command to the button click, then they do disappear at the same time, however then there appears to be a rogue one that makes one last pass - almost like it destroys the ones which have already been spawned but it still has one more to spawn which then isn’t picked up by the Destroy Actor command.

The only thing I’m still stuck with is how to differentiate the ones on the different splines from one another. It’s the spline itself that spawns the runner; so I’m thinking I may need to duplicate the spline BP for each box??? I’ll probably need separate interfaces too.
Probably not the most efficient way to do it, but it’s not like I’m making GTA6 and really need to optimise.

Edit:
So I’ve duplicated the spline and runner and interface (all blueprints), but the runner is not showing up when I add this new spline to the scene, I’ve altered all specifics in the code to say ‘box2’ also so there shouldn’t be any clashes with existing functions.
I did have a similar issue initially with the original spline and runner. If I tried to draw a new spline (I.E. add a second version of the BP to the scene) the runner wouldn’t show on it - however if I duplicated the existing spline in the scene (not the BP) then they would all work.
Edit_2:
Ignore that edit above - just realised I’d forgot to set the speed and offset on the new spline, so it wasn’t spawning anything…So I think this solves everything that I need right now, besides some of the timing issues.

  • Thanks so much for your help Mind-Brain. I couldn’t have done any of this without you. Even the parts you didn’t directly give me the solutions for, you pointed me in the right direction by just knowing the correct term to go looking for.

  • Maybe I’ll be back one day, looking to expand on what I’ve got now.
    Would it be best to start a new topic, or continue this one? Not sure how long it will be before I’m looking to alter this project.

Hey again @PX54!

It’s been my pleasure! Sad we’re done for now! :frowning: :stuck_out_tongue:

If you want me specifically to help you, you can send me a direct message.

If you want to put it out there on the forum, you’ll want to make a new topic at this point. You might get help from others, but we’ll need to try to keep it to one problem per post if we can.

Til next time! Hope to hear from you again!

Sorry just remembered, since the ultimate goal for this project is to have it on a touch screen I’ll need some help understanding how to set that up.
I’m assuming that it doesn’t automatically recognise a touch input as left mouse click.

No worries! This should be it!

Open your player controller that you’re using and make sure this is checked.