Multiple Animations

youg3 posted this 02 May 2019


Is it possible to create more than one animation sequence for the same model with PicaVoxel?

So basically could I have a Character Idle key framed out and then create a Character Walk animation with PicaVoxel for the same character or is this not possible?

I found the video on YouTube Gareth did about animating the Invaders quite useful on this but it was only the single constant animation which makes me question whether this is possible.

Order By: Standard | Newest | Votes
GarethIW posted this 02 May 2019

One of the limitations of the included Basic Animator script is that it only works for a single animation cycle as you have found.

Making multiple animations is fairly easy, but you will need to do some of the programming yourself.

The first thing you'll need to do is add your new frames to the existing animation and keep a note of the start and end frames of each animation cycle. For example:

  • Walk: Frame 1-5
  • Idle: Frame 6-7
  • Jump: Frame 8-10

and so on.

Then you need to cycle through the correct frames at the appropriate times yourself on the script that controls your character. Take a look at the BasicAnimator.cs code to see how I do it for a single cycle, then work from there. The main thing to note is that you change animation frame on the Volume object by calling volume.SetFrame(number).

Another option is to use a Mecanim exporter script that another PicaVoxel user wrote, which will then allow you to use Unity's Mecanim to control the animation. See the thread here:

Our 135 members have posted 514 times in 125 discussions