[Orxonox-commit 7233] r11847 - code/branches/3DPacman_FS18/src/modules/Pacman

dreherm at orxonox.net dreherm at orxonox.net
Sun Apr 1 00:33:08 CEST 2018


Author: dreherm
Date: 2018-04-01 00:33:08 +0200 (Sun, 01 Apr 2018)
New Revision: 11847

Modified:
   code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.cc
   code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h
Log:
Commit and check ghost class 3

Modified: code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.cc	2018-03-31 22:23:34 UTC (rev 11846)
+++ code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.cc	2018-03-31 22:33:08 UTC (rev 11847)
@@ -48,11 +48,11 @@
         this->localLinearAcceleration_.setValue(1, 1, 1);
         this->localAngularAcceleration_.setValue(1, 1, 1);
 
-        this->velocity = Vector3(0, 0, 0);
+        this->velocity.setValue(0, 0, 0);
 
         this->setCollisionType(CollisionType::Dynamic);
 
-        this->resetposition = Vector3(0,20,245); //Set Default start position
+        this->resetposition.setValue(0,20,245); //Set Default start position
         
         this->actuelposition = this->getPosition();
         
@@ -86,7 +86,7 @@
 
 
     
-    Vector3 possibleposition[] = {Vector3(0,10,245),Vector3(215,0,240)};
+    btVector3 possibleposition[] = {btVector3(0,10,245),btVector3(215,0,240)};
 
     /**
     @brief
@@ -122,11 +122,11 @@
         //Move, if ghost hasn't arrived yet
         if(this->ismoving){
             if(!((this->actuelposition.z-target_z)<0.1)) {
-                velocity = Vector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y),-sgn(this->actuelposition.z-this->target_z));
+                velocity = btVector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y),-sgn(this->actuelposition.z-this->target_z));
                 move(dt);
             }    
             if(!((this->actuelposition.x-target_x)<0.1)){
-                velocity = Vector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y-this->target_y),-sgn(this->actuelposition.z-this->target_z));
+                velocity = btVector3(-sgn(this->actuelposition.x-this->target_x),-sgn(this->actuelposition.y-this->target_y),-sgn(this->actuelposition.z-this->target_z));
                 move(dt);
             }
         }

Modified: code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h	2018-03-31 22:23:34 UTC (rev 11846)
+++ code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGhost.h	2018-03-31 22:33:08 UTC (rev 11847)
@@ -54,7 +54,7 @@
             virtual void rotatePitch(const Vector2& value);
             virtual void rotateRoll(const Vector2& value);
 
-            void move();
+            void move(float dt);
             
             //virtual void resetGhost();
             /**
@@ -139,9 +139,9 @@
             bool ismoving = false;
             int target_x = 0; 
             int target_z = 0; 
-            Vector3 actuelposition;
-            Vector3 velocity;
-            Vector3 resetposition;
+            btVector3 actuelposition;
+            btVector3 velocity;
+            btVector3 resetposition;
     };
 
 }



More information about the Orxonox-commit mailing list