Most performant way to set world location of several actors on a timeline for vehicle movement?

Most performant way to set world location of several (20-50) actors on a timeline for vehicle movement?

Put them all in a blueprint and move the blueprint :slight_smile:

Seriously though, if you try and keep them as separate actors, it will run slowly…

I guess this only works if they are moved with the same speed and direction? Or do you mean that there is a performance gain to move them relative to the blueprint?

1 Like

Sorry, not really clear on what you’re trying to do.

If this mixture of actors, the vehicle? Then I would say put them in a blueprint.

Or, are you trying to move the background, or…?

Im trying to move vehicles such as trains, boats etc indepentent of each other, by setting their position often enough for it to run smoothly. If this is not the way to go, do you have other movement methods that might work better for vehicles such as these?

1 Like

Ok, so they’re all separate objects, and you want to set the location of many of them runtime.

You can either set their location from the level blueprint, if they are just a mesh, or independently for each one, if they’re blueprints.

I don’t think there would be any difference here. There’s no trick, really :slight_smile:

Making each one a BP is the most elegant method, for sure. You also get to configure one central BP as the parent, and then each vehicle can’t inherit the methods from that one.

1 Like

I see, thanks :smiley: So none of the movement components or other systems that might make vehicle movement more performant? I dont want to use physics, as it is so unpredictable…

1 Like

It really depends on what you want.

If they are going to be real vehicles, and you might want control them, then you need to probably go down the standard route and use a vehicle blueprint.

If they just objects moving around to give the impression of realism, then you can cut some corners, although having a parent blueprint is still a good idea. Especially if you want them to follow splines etc.

Yeah I have already created a movement system for boats, trains and wagons using set location, but I am looking for ways to optimise this movement. If anyone have suggestions for parameters that can be tweeked or ways to update the location that might improve performance, I would be very happy to hear them :smiley:

If you were to rely on ticks for movement (like trains on splines) then you could consider aggregating the tick of all railway wagon’s to their driving train, or to a single controller.

The recent unreal talk mentions this at around 24:24

1 Like

Thankyou! Any tips is very appreciated :smiley: