I need help with making my sprite to switch to idle animation when standing still

Here is what im working with

Using tick should solve your problem. Make sure to set your movements inputs in Edit/Project Settings/Input

Are you using an animation blueprint?

Hi! Thanks for answering :slight_smile: btw this is a 3d game, just using sprites instead of 3dmodels. im also a huge newbie at unreal. ill try to use your wisdom to solve my problem! ^^

Hello, a simple solution could be to put these nodes inside the event tick instead of the event BeginPlay. That way, when your character will not be moving, it will automatically call the idle animation. However, doing so will cancel any other action (e.g. punching while not moving).

Alan Noon did a great youtube tutorial on how to implement 2D sidescrollers. You could check it here: Blueprint Creating a 2D Side-Scroller | 01 | Live Training | Unreal Engine - YouTube

Hope it helps :wink:

no, flipbook

116954-blopasda.png

Thank you for your help! :smiley:

No problem :smiley:

The problem is that since it is a 3d game, if you press two of the movement keys at the same time, and then release one of them you will get an idle animation moving

i will try this! :slight_smile:

Oh I see, then maybe you should track the player inputs instead of the sprite velocity. That way, when there’s no input, it will automatically put itself in idle state.

Here’s a sample code. If you set the axis value of the input to a variable, you could track this variable (-1 for left, 1 for right).

Hope it helps :wink:

https://answers.unrealengine.com/questions/560805/having-a-problem-with-making-a-simple-blueprint-to.html figured it out with this