# How to create animation and play it on key pressed?

**URL:** <https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [March 12, 2026, 5:23pm UTC](https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728 "2026-03-12T17:23:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [March 12, 2026, 5:23pm UTC](https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728/1 "2026-03-12T17:23:56Z")

</div>

Hi, I want to make an animation in which the first person character lifts their forearm in view of the first person camera on key press. And lowers it when key is pressed again. This needs to be able play whether the character is moving or idle, so detached from the rest of the body.

Also, the forearm needs to remain in view, even if the camera moves.

I don’t know much about animation. Can this be done in Unreal? Thanks.

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [March 13, 2026, 10:04pm UTC](https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728/2 "2026-03-13T22:04:14Z")

</div>

Hello 🙂

Of course it can be done but the question is quite broad and includes a lot of things that are hard to explain in text.

Check this [tutorial](https://www.youtube.com/watch?v=imA0aW9AdKo) out and write again if you still have trouble realizing your animation.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [March 16, 2026, 6:43pm UTC](https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728/3 "2026-03-16T18:43:31Z")

</div>

Thanks. Do you know if you can do something like this through motion matching? It’s suppose to replace state machines from what I understand?

Like play an animation on key press, through motion matching?

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [March 20, 2026, 10:27pm UTC](https://forums.unrealengine.com/t/how-to-create-animation-and-play-it-on-key-pressed/2705728/4 "2026-03-20T22:27:31Z")

</div>

In short: It is probably possible but surely unnecessary.

I haven’t dug deep into motion matching but the general idea is that the all animations clips have some additional data attached to them like “velocity vector”. You feed the Motion Matching System your data, your actual character velocity and your clips. The system then picks the animation clip with additional data that most closely matches (hence the name) the data you’ve provided (which is often the motion).

You can surely figure out a way to do it by adding some strange data your own clips and then trying to match it but it is an overkill in my opinion. The system is not build for that and I suspect you’ll find yourself fighting it.

I can’t be sure though so all power to you. If nothing else you’ll get to know what the limits of the system are.
