Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.






vortxGE 2.0 progress

Posted by Lee A. Stripp, 30 January 2012 · 145 views

Basic animation system all done and working nicely. Now on to skeleton animation. hmmm

Some example code from my test app showing a basic setup of keys etc...
  // ********************
  // Testing

  lsAnimationManager *am;
  lsActor *actor = new lsActor( demo_scene );
  actor->Init();
  actor->setName( "Actor Test" );
  am = actor->getAnimation_manager();
  actor->debug_batch = batch;
  demo_scene->Add_Node( actor );
  // anim
  lsVector3 pos;
  lsVector3 rot;
  lsVector3 sca;

  // we need 4 keys to produce a curve
  // position
  pos = lsVector3( 0, 1.5, 0 );
  am->InsertKey_Pos( 0, pos );
  am->InsertKey_Pos( 1, pos );
  pos = lsVector3( 10, 1.5, 0 );
  am->InsertKey_Pos( 150, pos );
  pos = lsVector3( 0, 1.5, 5 );
  am->InsertKey_Pos( 300, pos );
  pos = lsVector3( 0, 1.5, 0 );
  am->InsertKey_Pos( 499, pos );
  am->InsertKey_Pos( 500, pos );

  // rotation
  rot = lsVector3( 0, 0, 0 );
  am->InsertKey_Rot( 0, rot );
  am->InsertKey_Rot( 1, rot );
  rot = lsVector3( -6000, -4000, -2000 );
  am->InsertKey_Rot( 250, rot );
  rot = lsVector3( 6000, 4000, 2000 );
  am->InsertKey_Rot( 499, rot );
  am->InsertKey_Rot( 500, rot );

  // scale - just make sure scale is 1,1,1
  sca = lsVector3( 1.0, 1.0, 1.0 );
  am->InsertKey_Scale( 1, sca );

  am->setFramerate( 60.0 );
  am->Play( -5, 500, true );






November 2014 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26 272829
30      

Recent Comments

PARTNERS