Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2019, 9:39:55 AM (5 years ago)
Author:
jeromela
Message:

spielfeldgroesse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12336 r12339  
    144144            // And its position is set as to not overstep the boundary it has just crossed.
    145145            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");
    148155            }
    149156            if (position.z < -this->fieldHeight_ / 2){
     
    203210            // Set the speed in the direction of the balls current velocity.
    204211            Vector3 velocity = this->getVelocity();
    205             if (velocity.x != 0)
     212            //if (velocity.x != 0)
    206213                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));
    209216            //velocity.y = this->speed_;
    210217            velocity.z = this->speed_;
Note: See TracChangeset for help on using the changeset viewer.