Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6004 in orxonox.OLD for trunk/src/world_entities/npcs/npc_test1.cc


Ignore:
Timestamp:
Dec 9, 2005, 11:12:04 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: new algorithm to rotate entities for drawing works (shifcoor ONLY takes normalized Vectors…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc_test1.cc

    r5750 r6004  
    3232NPCTest1::NPCTest1()
    3333{
    34   this->setClassID(CL_NPC, "NPCTest1");
     34  this->setClassID(CL_NPC_TEST1, "NPCTest1");
    3535
    3636  if ((float)rand()/RAND_MAX > .5f)
     
    3939    this->loadModel("models/ships/gobblin.obj", 2);
    4040
    41   this->randomRotAxis =  VECTOR_RAND(1);
     41  this->randomRotAxis =  VECTOR_RAND(1).getNormalized();
    4242}
    4343
     
    8080void NPCTest1::tick(float dt)
    8181{
    82 //  Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor());
    83 
    84   //if (directin.len() < 100)
    85 //  this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0));
    8682  this->shiftDir(Quaternion(dt, this->randomRotAxis));
    87 
    8883}
    8984
Note: See TracChangeset for help on using the changeset viewer.