Hi everyone,

I've spend countless hours trying to achieve a convincing smooth blend animation between frames using vertex animation.
Searched AUM and the forum without result, everyone seems to be giving incomplete answer and so far nobody was able to replay.
AUM is pretty much incomplete and manual doesn't say much about it.

Here is my piece of code. Any help is highly appreciated:

Concept - The player move towards specific direction a vector, if the distance between the player and the vector is less than 90, transition from the run animation into walk animation smoothly:

Code:
action player()
{	
	player = me; // copy the entity pointer to the global player pointer
   ... // more code

	while (1){

		if(mouse_left){
			
			vec_to_angle(my.pan, target_distance);
			my.tilt = 0; // don't change player's tilt angle, though
			
         // move the player while the ditance is higher that 45
			while((vec_dist(my.x,hit_coords.x) > 45){
				
				if (vec_dist(my.x,hit_coords.x) < 90){ // if the distance from the player to the target is less than 90,transition animation to walk
					
					ent_animatefrom(me,me,"run",50,ANM_CYCLE);
					ent_blendframe(me,me,"walk",0,25);

					ent_animate(my, "walk", walk_percentage, NULL); // then play the "run" animation
					walk_percentage += 4 * time_step; // 7 = "run" animation speed
					walk_percentage %= 100;
					dist_ahead = 2 * time_step;
				}
				
				else{
					
					dist_ahead = 7 * time_step;
					ent_animate(my, "run", anim_percentage, ANM_CYCLE); // then play the "run" animation
					anim_percentage += 7 * time_step; // 7 = "run" animation speed
					anim_percentage %= 100;
					walk_percentage = 0;
					
				}
				
				... // more code
						
				c_move(me,vector(dist_ahead,0,0),vector(0,0,-dist_down),IGNORE_PASSABLE | GLIDE | SCAN_TEXTURE); // move the player
				
				wait(1);
				
			}
		}
		
		wait(1);	
		
	}
}



I've excluded the part of the code that calculates the distances etc., since that one is working just fine,
but basically that's the section that takes care of the animation transition. It looks like the animation just snaps, instead of having an smooth transition.

I've look into the Kingdom of Hearts animation, but is just wait to much code for such a simple thing.
Also, look into the Diverse Movement Code, but nothing.

Thanks in advance. Pardon my frustration frown .


No matter what people tell you,  words and ideas can change the world.