# Adding animation to static mesh on pawn

**URL:** <https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222>\
**Category:** Character & Animation\
**Tags:** unreal-engine, question\
**Created:** [May 31, 2023, 6:27am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222 "2023-05-31T06:27:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstipus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Konstipus](https://forums.unrealengine.com/u/Konstipus)\
**Post date:** [May 31, 2023, 6:27am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/1 "2023-05-31T06:27:02Z")

</div>

Hello,

In my project I currently have a player controllable pawn - a tank, with 2 static meshes for turret and body.

Is there any way to animate the tracks while the input command is being held (by maybe making them into a seperate static mesh) so they actually rotate following the shape? they are modeled in.

If that is not possible, what would You suggest doing to fix this?

---

<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:** [May 31, 2023, 6:47am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/2 "2023-05-31T06:47:24Z")

</div>

It really depends on how things are set up atm.

Check this out:

> [@Multiple instanced meshes along a spline](https://forums.unrealengine.com/t/multiple-instanced-meshes-along-a-spline/1167956/20):
>
> Construction Script where we create as many offsets as there are instances The timeline is just 0-1 alpha. The Dirty flag is optional but a good optimisation practice.

Or go deeper:

[https://www.youtube.com/results?search\_query=ue4+tank+tracks](https://www.youtube.com/results?search_query=ue4+tank+tracks)

---

<div class="post-metadata">

**Author:** ![Konstipus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Konstipus](https://forums.unrealengine.com/u/Konstipus)\
**Post date:** [May 31, 2023, 6:50am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/3 "2023-05-31T06:50:49Z")

</div>

Oh, the things are really barebone, as this is my first practice project. Tracks are just part of static mesh of the base of tank. It seems like the links You provided refer to exact problem I am having. Thank You.

---

<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:** [May 31, 2023, 6:52am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/4 "2023-05-31T06:52:16Z")

</div>

Also, it depends whether you want the track to deform when the tank rolls over obstacles. If you do not need it, the best way would be to animate the material. May look good enough and would be super fast.

---

<div class="post-metadata">

**Author:** ![Konstipus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Konstipus](https://forums.unrealengine.com/u/Konstipus)\
**Post date:** [May 31, 2023, 7:42am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/5 "2023-05-31T07:42:52Z")

</div>

Oh there is not even gravity applied there, no obstacles and the game is top-down, so animation of materials is probably the best option - i did not know that was possible to be honest. I will need to look into that 🙂

---

<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:** [May 31, 2023, 7:45am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/6 "2023-05-31T07:45:58Z")

</div>

Aye, the keyword here is `panner`:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/3/cf3326553be72a9d4a3a0e85b16ec3d00381d941.jpeg "Ue4: advanced materials (Ep. 13 Panner Node - Animated Material)") ](https://www.youtube.com/watch?v=G7rj_QlhNGI)

Example result.

---

<div class="post-metadata">

**Author:** ![Konstipus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Konstipus](https://forums.unrealengine.com/u/Konstipus)\
**Post date:** [May 31, 2023, 7:54am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/7 "2023-05-31T07:54:34Z")

</div>

Thanks for providing this info, great help! Is there any way to bind panner animation to be only played at certain times? I.E. when event is called etc?

---

<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:** [May 31, 2023, 8:03am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/8 "2023-05-31T08:03:15Z")

</div>

Yes. You create a dynamic material and feed it value.

---

<div class="post-metadata">

**Author:** ![Konstipus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Konstipus](https://forums.unrealengine.com/u/Konstipus)\
**Post date:** [May 31, 2023, 8:12am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/9 "2023-05-31T08:12:16Z")

</div>

Thank You very much man/maam. Was not expecting such quick responses. Now I have something to work on!

---

<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:** [May 31, 2023, 9:14am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/10 "2023-05-31T09:14:51Z")

</div>

> [@Konstipus](#):
>
> Now I have something to work on!

In case you get stuck, this could be a half-decent experimentation starting point:

- material

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/2/042ab44b921e6c444b60e227c03af7d109a5ad25.jpeg)

- tank pawn constructs a dynamic material:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/8/dc8a87e18f2ba4797a0fc8eebfc51baf7c77eb5c.png)

- controlling the material (this should probably be in the tank Pawn actor):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/4/5/7457eddf5cb0971724a4a718b389913a2b92b832.jpeg)

This is, obviously, not shipment ready 😇 but should be flexible enough. You’d need to look into how to map the material.

Good luck!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 30, 2023, 9:15am UTC](https://forums.unrealengine.com/t/adding-animation-to-static-mesh-on-pawn/1184222/11 "2023-06-30T09:15:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
