# Using Timeline to move StaticMesh struggle

**URL:** <https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 22, 2021, 9:59am UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308 "2021-04-22T09:59:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![KBH\_Darekaar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KBH\_Darekaar](https://forums.unrealengine.com/u/KBH_Darekaar)\
**Post date:** [April 22, 2021, 9:59am UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/1 "2021-04-22T09:59:46Z")

</div>

Hello UE community

I have a BP class which I can move left and right.

I want to be able to move the staticmesh in more directions, without duplicating the class and creating a ton of timelines.

Is there an easier way to do this? I will attach a picture of my nodes.

Right now I am just checking if a boolean is true or false, and have 2 timelines. Is it possible to have all this in 1 timeline, instead of creating duplicate classes and multiple timelines?

 ![336703-ue-forum.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/5/a75a94cb66dde11db94b35c5deff80365ef4afe8.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 22, 2021, 10:45am UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/2 "2021-04-22T10:45:21Z")

</div>

Yes. Have a look here:

> [@Changing Text3D Location Progress over time?](https://forums.unrealengine.com/t/changing-text3d-location-progress-over-time/225578/2):
>
> Many ways to do it. Timeline gives you great control over many aspects of the movement: Here, the TL’s New Track 0 float is a value that goes from 0 to 1 over 1s. You can set it up inside the timeline:

Timeline should really output a 0-1 float track that serves as alpha to Lerp between 2 values. You prepare data before the TL starts and then use the TL’s output to shift between those 2 locations.

This way you have a single vector variable and the actor would move by _that much_ each time the timeline is activated.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [April 22, 2021, 12:12pm UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/3 "2021-04-22T12:12:19Z")

</div>

I would generally do as follows:

1. In the Timeline, create a float curve that goes from 0 to 1;

2. Add 2 Box Collision components and set them to No Collision;

3. Make your float curve act as Alpha for a [Vector Lerp] node, where vectors A and B are World Locations of the Box Collision components;

4. After placing a blueprint into the level, drag the Boxes to where you want your mesh to move;

5. Now your mesh can move between these two points. Play the timeline forward and reverse instead of using bools.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 22, 2021, 12:23pm UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/4 "2021-04-22T12:23:23Z")

</div>

Billboards are neater than collision boxes with no collision because they have dragon heads, and you can’t beat that!

![336730-screenshot-5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/5/5e5cbb1dcadc2a97782184940b8cb615d4ad9284.png)

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [April 22, 2021, 12:26pm UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/5 "2021-04-22T12:26:42Z")

</div>

Oh, that’s a dragon? I always thought it was a sick camel or something =)

I just like collision boxes because you can resize them and visualize where the mesh would be when it stops moving.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 22, 2021, 12:31pm UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/6 "2021-04-22T12:31:16Z")

</div>

Sick camel? ☹ Just look at them furrowed brows!

* * *

But I do agree, boxes can visualise initial / final locations better and you can actually get their full transform + extent if necessary.

---

<div class="post-metadata">

**Author:** ![KBH\_Darekaar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KBH\_Darekaar](https://forums.unrealengine.com/u/KBH_Darekaar)\
**Post date:** [April 29, 2021, 10:19am UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/7 "2021-04-29T10:19:33Z")

</div>

![337464-udklip.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/4/bd49a493eccb631f06a9ffa6d20954d117faf006.jpeg)

looks like this guy.

the code in [Changing Text3D Location Progress over time? - #2 by Everynone](https://forums.unrealengine.com/t/changing-text3d-location-progress-over-time/225578/2) gives me an infinite loop

 ![337465-udklip2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/4/9c48574841d8c9b9361aa99f8dddc97f124fb026.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 29, 2021, 11:37am UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/8 "2021-04-29T11:37:52Z")

</div>

If you have a Block Actor spawning the _same_ Block Actor (which spawns another actor (which will spawn the same actor (which will spawn the same actor)))…, that’d be an infinite loop, sure.

Don’t do that. Spawn it elsewhere.

---

<div class="post-metadata">

**Author:** ![KBH\_Darekaar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KBH\_Darekaar](https://forums.unrealengine.com/u/KBH_Darekaar)\
**Post date:** [April 29, 2021, 1:52pm UTC](https://forums.unrealengine.com/t/using-timeline-to-move-staticmesh-struggle/482308/9 "2021-04-29T13:52:18Z")

</div>

Yea I tried creating a new actor with that code, but the result was the same? But I figured out how to make what I wanted with inspiration from your code!

 ![337488-udklip.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/3/203b40926373ae1ea2a6fd3aa705df14bfc277dc.jpeg)

Just edit location B for the end point of the Mesh
