Changeset 12339 for code/branches/OrxoBlox_FS19/src/modules
- Timestamp:
- May 9, 2019, 9:39:55 AM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12337 r12339 143 143 // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to. 144 144 this->center_->attach(this->ball_); 145 this->ball_->setPosition(0, 0, 40); 145 //Startposition Ball 146 this->ball_->setPosition(0, 0, 50); 146 147 this->ball_->setFieldDimension(this->center_->getFieldDimension()); 147 148 this->ball_->setSpeed(0); -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc
r12336 r12339 144 144 // And its position is set as to not overstep the boundary it has just crossed. 145 145 if (position.z > this->fieldHeight_ / 2){ 146 ChatManager::message("Ball hat das Feld verlassen"); 147 //TODO: ball zerstoeren 146 // Set the ball to be exactly at the boundary. 147 position.z = this-> fieldHeight_ / 2; 148 // Set the velocity to zero 149 this->setSpeed(0); // doesn't work here, why??; 150 //velocity.x = 0; 151 //velocity.y = 0; 152 //velocity.z = 0; 153 orxout() << "Output" << endl; 154 ChatManager::message("Waiting"); 148 155 } 149 156 if (position.z < -this->fieldHeight_ / 2){ … … 203 210 // Set the speed in the direction of the balls current velocity. 204 211 Vector3 velocity = this->getVelocity(); 205 if (velocity.x != 0)212 //if (velocity.x != 0) 206 213 velocity.x = sgn(velocity.x) * this->speed_; 207 else // If the balls current velocity is zero, the speed is set in a random direction.208 velocity.x = this->speed_ * sgn(rnd(-1,1));214 //else // If the balls current velocity is zero, the speed is set in a random direction. 215 // velocity.x = this->speed_ * sgn(rnd(-1,1)); 209 216 //velocity.y = this->speed_; 210 217 velocity.z = this->speed_; -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.cc
r12307 r12339 56 56 RegisterObject(OrxoBloxCenterpoint); 57 57 58 this->width_ = 200;59 this->height_ = 120;58 this->width_ = 100; 59 this->height_ = 50; 60 60 this->ballspeed_ = 100; 61 61 this->ballaccfactor_ = 1.0;
Note: See TracChangeset
for help on using the changeset viewer.