How to Set a static mesh actor variable to blueprint generated static mesh

ok, every frame, you only need to generate the amount that you wish it to move. Because by using the “add relative location”, node, whatever amount you are generating to move the object, is being added to it’s current location, hence UE4, already knows the current location, and is just taking the amount you wish to move it, and adding the amount you give it.

Your Y Axis more than likely should always be zero (we know it’s not, because it’s moving off to the right/left, this is only true because your spline is a straight line), and the X-Axis changing (the forward distance on the spline), and the Z-Axis is changing (the elevation of the stairs). Be sure that the spline, is facing it’s natural forward direction, while your starting this out.

By natural forward direction, when you first drag and drop the blueprint into the level,just click on Spline point 1, and drag that forward for length X, and then grab the Z-Axis, and move that up course. This way there is no rotation going on, Y-axis should always stay zero like this.

.

How long would it take to recreate this with LW-Spline ?

With the multiplying of the delta time by the spedd and then setting the direction, should that not be done per step ?

Multiply the speed by the delta time, and then that one value can be used to add to the current location, for all the steps, this will keep all the steps in synch (assuming they start out placed correctly) with each other, so if they should be moving A units forward, and B units up, on the spline, you would want that same amount applied to all of them.

So it’s calculate the amount one time, and apply that to all the steps.

.

Alright i get you, so how do i get the direction for each step within the array ?

Also the direction variable is empty. so i need to give the driection variable a value that it must move by ?

My event graph has not changed since the last image i posted of it, what needs to change there ?

as your spline, only has two points of interest, point 0 (the origin) and point 1 (the termination point of the stairs. You probably should be using one “Direction Vector”. This can be obtained by getting the location of point 0 and point 1, then calling a node “Get Direction vector” using point 0 location as the from, and point 1 as the “to”. This is going to give you a vector that can be used to “scale” how much each step is being moved, on the two axis, per tick.

So we have

Add Relative Location = ((Speed * Delta) * Direction Vector)

The direction vector will stay constant as your not concerned about moving spline points around, etc during runtime, and your only concerned about 1 vector, that being between point 0 and 1, as all your stairs are along that segment.

So grab the Direction vector in the construction phase of the blueprint, then use it in the Event graph, then add the relative location to each step.

.

Hi there, Sorry i havent replied, i got caught up with my models and other things.

So when you say point 0 and 1, you mean start and end, it dosnt matter if there are points between these as its the first adn last idext of the spline, correct ?

Hi there, I may have already asked this, but are we not supposed to be moving the static mesh actors and not the components, could that be why we are moving the entire root component ?