Project Update: Player animation movements

2D animations, my player needs to move like a real person not more like a cube skating on surfaces.

With sprites, animations have a few basic steps.
We must use a sprite sheet and we must make sure that its subdivision is correct. To do this we just open the sprite editor and go to modify the division into cells so that it is homogeneous.

Now we need to create our animation with the created sprites and manage the transitions between the animations.
Now let’s look at just the motion animations. Idle, move and jump.

The part about creating animations is the same for all three. Once we have selected the sprite of our player and created the folder where we are going to save them. We just have to drag the sprites into the Animation panel and set the Sample Rate as we like.

Every time we create a new animation it is inserted into the Animator panel.

As we have already seen other times before moving on to the code, we must manage transitions and create the parameters that we need to pass from one animation to another.

Moving on to the code, I managed the movement of the player separately from the management of the animations.

In one script we manage the real movement of the game object, in the second script, there are public methods that guide the transitions between the animations that are properly called when needed by the main script.

project manager by day, unity developer by night

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Interesting Fact of MYSQL Select Query

How do I copy data from one Excel sheet to another using a batch file?

Woke up in the morning to find that my app reached top #10 in Hacker News

Web Architecture for beginners

Tableless Query for Postgres

Web Dev Confession: Why achieving higher page speed is “tricky”?

BigQuery — An Encounter with Dynamic SQL’s

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrea Alicino

Andrea Alicino

project manager by day, unity developer by night

More from Medium

Modular Powerup System in Unity

Platformer: Player Animation Part 3 (continued)

Unity Features 101: Assembly Definitions

More Productive Editor Layout in Unity