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:

RVZS posted this 02 August 2019

I'm not getting this script to work either. Does anyone have an updated script that works for multiple animations? Or any plans to implement multiple animations in future versions?

GarethIW posted this 02 August 2019

I made a quick tutorial for using timmypowergamer's script on the other thread:

It's still working fine in 2019, and is probably the best way of doing multiple anims.

RVZS posted this 02 August 2019

Wow, that was quick! I followed your tutorial and its working perfectly. :) Thanks!

Our 137 members have posted 530 times in 129 discussions