Changeset 8106 for code/branches/tetris/src/modules/pong/PongBall.cc
- Timestamp:
- Mar 23, 2011, 6:22:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tetris/src/modules/pong/PongBall.cc
r8105 r8106 144 144 // Set the ball to be exactly at the boundary. 145 145 position.x = this->fieldWidth_ / 2; 146 // Invert its velo xity in x-direction (i.e. it bounces off).146 // Invert its velocity in x-direction (i.e. it bounces off). 147 147 velocity.x = -velocity.x; 148 148 // Adjust the velocity in the z-direction, depending on where the ball hit the bat. … … 171 171 // Set the ball to be exactly at the boundary. 172 172 position.x = -this->fieldWidth_ / 2; 173 // Invert its velo xity in x-direction (i.e. it bounces off).173 // Invert its velocity in x-direction (i.e. it bounces off). 174 174 velocity.x = -velocity.x; 175 175 // Adjust the velocity in the z-direction, depending on where the ball hit the bat.
Note: See TracChangeset
for help on using the changeset viewer.