Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11847


Ignore:
Timestamp:
Apr 1, 2018, 12:33:08 AM (6 years ago)
Author:
dreherm
Message:

Commit and check ghost class 3

Location:
code/branches/3DPacman_FS18/src/modules/Pacman
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.cc

    r11846 r11847  
    4949        this->localAngularAcceleration_.setValue(1, 1, 1);
    5050
    51         this->velocity = Vector3(0, 0, 0);
     51        this->velocity.setValue(0, 0, 0);
    5252
    5353        this->setCollisionType(CollisionType::Dynamic);
    5454
    55         this->resetposition = Vector3(0,20,245); //Set Default start position
     55        this->resetposition.setValue(0,20,245); //Set Default start position
    5656       
    5757        this->actuelposition = this->getPosition();
     
    8787
    8888   
    89     Vector3 possibleposition[] = {Vector3(0,10,245),Vector3(215,0,240)};
     89    btVector3 possibleposition[] = {btVector3(0,10,245),btVector3(215,0,240)};
    9090
    9191    /**
     
    123123        if(this->ismoving){
    124124            if(!((this->actuelposition.z-target_z)<0.1)) {
    125                 velocity = Vector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y),-sgn(this->actuelposition.z-this->target_z));
     125                velocity = btVector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y),-sgn(this->actuelposition.z-this->target_z));
    126126                move(dt);
    127127            }   
    128128            if(!((this->actuelposition.x-target_x)<0.1)){
    129                 velocity = Vector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y-this->target_y),-sgn(this->actuelposition.z-this->target_z));
     129                velocity = btVector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y-this->target_y),-sgn(this->actuelposition.z-this->target_z));
    130130                move(dt);
    131131            }
  • code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h

    r11846 r11847  
    5555            virtual void rotateRoll(const Vector2& value);
    5656
    57             void move();
     57            void move(float dt);
    5858           
    5959            //virtual void resetGhost();
     
    140140            int target_x = 0;
    141141            int target_z = 0;
    142             Vector3 actuelposition;
    143             Vector3 velocity;
    144             Vector3 resetposition;
     142            btVector3 actuelposition;
     143            btVector3 velocity;
     144            btVector3 resetposition;
    145145    };
    146146
Note: See TracChangeset for help on using the changeset viewer.