Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7003 in orxonox.OLD for trunk/src/lib/coord/p_node.cc


Ignore:
Timestamp:
Feb 3, 2006, 2:55:14 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: fixed a nasty PNode bug …
@patrick: you were right about it being still debugged :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r6959 r7003  
    215215
    216216  *this->toCoordinate = relCoordSoft;
    217   this->toStep = 0.0f;
    218217  this->bias = bias;
    219218}
     
    301300      *this->toCoordinate = absCoordSoft;
    302301  }
    303   this->toStep = 0.0f;
    304302}
    305303
     
    373371  *this->toDirection = relDirSoft;
    374372  this->bias = bias;
    375   this->toStep = 0.0f;
    376373  this->bRelDirChanged = true;
    377374}
     
    443440
    444441  this->bias = bias;
    445   this->toStep = 0.0f;
    446442  this->bRelDirChanged = true;
    447443}
     
    650646  }
    651647  this->bias = bias;
    652   this->toStep = 0.0f;
    653648
    654649  Vector tmpV = this->getAbsCoor();
     
    781776        if (unlikely(this->toDirection != NULL))
    782777        {
    783           this->toStep += fabs(dt) * bias;
    784778          //printf("%s::%s %f\n", this->getClassName(), this->getName(), this->toStep );
    785           Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, toStep);
    786           if (this->relDirection.distance(rotQuat) >PNODE_ITERATION_DELTA)
     779          Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, .1);
     780          if (this->relDirection.distance(rotQuat) > PNODE_ITERATION_DELTA)
    787781          {
    788782            this->relDirection = rotQuat;
     
    794788            this->toDirection = NULL;
    795789            PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
     790            this->bRelDirChanged;
    796791          }
    797792        }
     
    817812          this->absCoordinate = this->parent->getAbsCoor() + this->relCoordinate;
    818813        }
    819         else if( this->parentMode & PNODE_ROTATE_MOVEMENT && this->bRelCoorChanged)
     814        else if( this->parentMode & PNODE_ROTATE_MOVEMENT && (this->bRelCoorChanged || this->bRelDirChanged))
    820815        {
    821816          /* update the current absCoordinate */
Note: See TracChangeset for help on using the changeset viewer.