Changeset 11847
- Timestamp:
- Apr 1, 2018, 12:33:08 AM (7 years ago)
- 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 49 49 this->localAngularAcceleration_.setValue(1, 1, 1); 50 50 51 this->velocity = Vector3(0, 0, 0);51 this->velocity.setValue(0, 0, 0); 52 52 53 53 this->setCollisionType(CollisionType::Dynamic); 54 54 55 this->resetposition = Vector3(0,20,245); //Set Default start position55 this->resetposition.setValue(0,20,245); //Set Default start position 56 56 57 57 this->actuelposition = this->getPosition(); … … 87 87 88 88 89 Vector3 possibleposition[] = {Vector3(0,10,245),Vector3(215,0,240)};89 btVector3 possibleposition[] = {btVector3(0,10,245),btVector3(215,0,240)}; 90 90 91 91 /** … … 123 123 if(this->ismoving){ 124 124 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)); 126 126 move(dt); 127 127 } 128 128 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)); 130 130 move(dt); 131 131 } -
code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h
r11846 r11847 55 55 virtual void rotateRoll(const Vector2& value); 56 56 57 void move( );57 void move(float dt); 58 58 59 59 //virtual void resetGhost(); … … 140 140 int target_x = 0; 141 141 int target_z = 0; 142 Vector3 actuelposition;143 Vector3 velocity;144 Vector3 resetposition;142 btVector3 actuelposition; 143 btVector3 velocity; 144 btVector3 resetposition; 145 145 }; 146 146
Note: See TracChangeset
for help on using the changeset viewer.