Merging animation sequences

Blitz3D Forums/Blitz3D Programming/Merging animation sequences

Right, some of the above posts confused me a little however I came across this same problem in my game and created a solution so I thought I'd share the concept behind it and let you decide who has the best way.

Firstly I loaded all of the animations that I needed to play on the one model. Second I created a multidimensional array for each bone in the character. Before the main loop is reached I have a routine to play all of the animations through and captured the rotations of each bone at each frame into the arrays. Finally I have another function or functions that sets the bones’ orientations of the model in the scene, usually the legs and hips take the rotations from one animation whilst the upper body takes the rotations from another animation.

Make sure you use the right global options for reading and setting bones' orientations as I ran into many weird errors early on because I was using the wrong ones or mixtures! It should actually be relative to their parent rotations not an absolute rotation. A silly but easy mistake to make.

Sorry if this wasn't very clear, I'd post my code but it's very kludgy and I really ought to have rewritten it myself.