How to create avatar animations ?





To create a new animation, open your inventory, click right and choose the menu New > BVH
That creates a new MyBVH.




To edit an animation, open your inventory, click right on a BVH and choose the menu Edit.




Buttons:












To add an animation in furniture :


// Example 1 : dancing ball

const string ANIMATION_NAME = "dancing";

event touch()
{
  key k = touched_avatar();

  if (is_animation_active (ANIMATION_NAME, k))
    stop_animation (ANIMATION_NAME, k);
  else
    start_animation (ANIMATION_NAME, k);
}


 
// Example 2 : sit on a chair

event touch()
{
  key k = touched_avatar();

  if (is_sitting (k))
  {
    unsit (k);
  }
  else if (sit (mesh_nr  => 1,
                position => {0.0, 0.0, 1.0},
                rotation => {0.0, 0.0, 0.0},
                avatar   => k))
  {
    start_animation ("sit", k);
  }
}




Alternatively, you can create an animation with an extern program, for example QAvimator, and then import it in your inventory.