The court
Short version: the net is at the center of the world, the court runs along the z axis, sideways is x, and up is y. One player plays on the positive z half, the other on the negative half.
Directions
| Axis | Direction | Notes |
|---|---|---|
| x | sideways | 0 is the middle of the court |
| y | up | 0 is the court surface |
| z | along the court | 0 is the net; one player is on z > 0, the other on z < 0 |
Because everything is measured from the net, many rules become simple: a ball is “on my side” when its z has the same sign as my position, and “how deep” a ball is means simply how far its z is from 0.
Dimensions
| Line | Distance |
|---|---|
| Net height | 0.914 m in the middle, 1.07 m at the posts (a singles net: posts 5.03 m from the middle, no singles sticks) |
| Service line | 6.40 m from the net |
| Baseline | 11.885 m from the net |
| Singles sideline | 4.115 m from the middle |
Facing and “left/right”
Players always face the net. A ball on the player’s right (as they look at the net) is played with a forehand, a ball on their left with a backhand. For the player on the positive z half, their right is the positive x side.
Your controls follow the screen instead: pushing “up” moves you up the screen. The game turns your input by the camera’s direction, so the controls feel the same at both ends of the court.
scripts/core/game_constants.gd (court dimensions), scenes/court/court.gd
(court regions used for in/out decisions).