- Timestamp:
- May 17, 2018, 4:14:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
r11959 r11976 439 439 440 440 void PacmanGhost::move(float dt, Vector3 actuelposition, Vector3 velocity){ 441 if(!dontmove) 441 if(!dontmove){ 442 442 this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt)); 443 444 445 if(abs(velocity.x) == 2){ 446 this->setOrientation(Quaternion(Radian(0), Vector3(0, 1, 0))); 447 } 448 else if(velocity.z == 2){ 449 this->setOrientation(Quaternion(Radian(0), Vector3(0, 1, 0))); 450 } 451 else if(velocity.z == -2){ 452 this->setOrientation(Quaternion(Radian(180), Vector3(0, 1, 0))); 453 } 454 else{} 455 456 } 443 457 } 444 458
Note: See TracChangeset
for help on using the changeset viewer.