Adding animation to static mesh on pawn

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?

It really depends on how things are set up atm.

Check this out:

Or go deeper:

https://www.youtube.com/results?search_query=ue4+tank+tracks

1 Like

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.

1 Like

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.

1 Like

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 :slight_smile:

Aye, the keyword here is panner:

Example result.

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?

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

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

1 Like

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

  • material

  • tank pawn constructs a dynamic material:

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

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

Good luck!

1 Like

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