# Animations

## How to create an animation

You can animate your models normally, like you would do with normal Blockbench models.\
You can find a lot of tutorials on YouTube.

{% embed url="<https://www.youtube.com/results?search_query=blockbench+animation+tutorial>" %}

## Lock the player movement

You can specify if the player can move while playing one specific animation or not.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-70eafaa0f76add826862fb4500dfda403e38d33f%2Fimage%20\(76\).png?alt=media)

## Looping animations

You can create animations which would play `start` -> `loop` -> `end` sub-animation.\
This allows you to create complex looping animations, for example a sleep animation where your player would lay and stay there until the player presses SHIFT.

### Step 1

Create the animation, in this example a death animation.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-b1d33213ff03ea720fccd9ea5bd12f0cef6c53cb%2Fimage%20\(96\)%20\(1\).png?alt=media)

Right click it and mark it as `Loop`.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-d6865e14e9187407ff1d3909466498e1e4fdc63d%2Fimage%20\(92\)%20\(1\).png?alt=media)

### Step 2

Now place the cursor on the frame where you want the loop to start, in this case when the player is on the ground.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-63ba56a063432e29f5baa2c9b49b5c26bc51e57c%2Fimage%20\(75\).png?alt=media)

### Step 3

Click on the `Add Loop Start/End marker` icon to add a `start loop` marker.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-3f154ae5cb9a98b2faf55b45ffba455488f931dc%2Fimage%20\(60\).png?alt=media)

Now place the animation cursor on the frame where you want the loop to stop and press again on the `Add Loop Start/End marker` icon.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-ede744e90293cf632a6f73078cff1aaae1ce305f%2Fimage%20\(46\).png?alt=media)

The result will be like this:

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-ea3ade8edbdf74f15539b1fcdcdef41fcaf56638%2Fimage%20\(93\).png?alt=media)
