Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2006, 7:40:14 PM (18 years ago)
Author:
gfilip
Message:

just to be save ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/camera.cc

    r10094 r10103  
    309309
    310310
    311 Vector itarateTo(0,0,0);
    312 
     311Vector translateTo(0,0,0);
     312Vector rotateBy(0,0,0);
     313float speed=1;
    313314
    314315CameraTarget::CameraTarget()
     
    334335
    335336
    336 float CameraTarget::iterate(float dt, Vector target, Vector cam)
    337 {
     337Vector CameraTarget::iterate(float dt, Vector* target, Vector* cam)
     338{
     339
     340  //this condititon if needed in tick:    if (tmpVec.x >= 0.01)
    338341  Vector tmpVec;
    339 
    340       tmpVec= (target - cam);
    341 
    342   if (tmpVec.x >= 0.01)
    343 
    344   return  0;//tmpVec * fabsf(dt);
     342  tmpVec= (*target - *cam);
     343  tmpVec.normalize();
     344  return  tmpVec;
    345345
    346346}
     
    354354
    355355
    356 
     356void CameraTarget::changeSpeed(float speed)
     357{
     358  if (speed!=0)
     359this->speed=speed;
     360  return;
     361}
Note: See TracChangeset for help on using the changeset viewer.