To begin with, I'll describe the initial launch conditions and some definitions:
Shown here is the initial orientation of the stage 1 rocket. The small compass in the lower left corner indicates the north and east directions in game. The little cartesian cross diagram is the rocket. Thrust (defined here as the direction that imaginary propellant is expelled - shown with a little flame) points toward the ground. Acceleration, ignoring gravity effects (which are constant) always points opposite thrust. This definition may be a little confusing (maybe I'll change it later or use different terminology, but for now...): the Thrust field in the stage editor indicates the magnitude of the thrust; the direction of thrust (as used here) is opposite the the rocket's forward direction at launch time (I'll get into that later).
The letters F, U, D, L and R indicate the direction that a rocket launched from this stage will have its forward vector if launched in the Forward, Up, Down, Left or Right directions, respectively. It is important to note that these directions are just labels. This often leads to confusion because "up" does not mean "toward the sky".
Thus, assuming stage 1 has no rotation, a rocket fired "up" from this stage 1 will fire such that stage 2's forward launch direction is north, while a rocket fired "right" from this stage 1 will fire such that stage 2's forward launch direction is east.
Stage | Duration | Speed | Thrust | Rotation | Axis | Color | Parent | Direction | Rockets | Reps | Offset |
1 | 3 | 30.78 | 0 | 0 | right | none | |||||
2 | 3 | 10.26 | 0 | 0 | right | none | 1 | up | 1 | 1 | 0 |
3 | 3 | 10.26 | 0 | 0 | right | none | 1 | down | 1 | 1 | 0 |
4 | 3 | 10.26 | 0 | 0 | right | none | 1 | left | 1 | 1 | 0 |
5 | 3 | 10.26 | 0 | 0 | right | none | 1 | right | 1 | 1 | 0 |
Firing a rocket from stage 1 in either the U, D, L or R directions, then firing in the D direction from that rocket, in each case fires a rocket toward the sky. With that vector and the F direction obtained from the launch direction its self, the orientations of stages 2 through 5 should be as shown (with red curved arrows indicating the way the orientation of the first stage is turned to become the orientation of the latter stage):
In other words, each stage's orientation is derived by first rotating stage 1's F 90 degrees toward U (around LR axis). For stage 2, it's done. For stage 3, it's then rotated 90 degrees from stage 1's U towards L (around F-thrust axis), and so on. Mathematically, this can be described by matrix multiplication. Consider a 3x3 matrix Mo(N) describing three of stage N's mutually-orthogonal vectors (corresponding to X, Y and Z in cartesian space, say), and a matrix Tr(AB, theta) for rotation of angle theta about an arbitrary vector between points A and B:
A problem arises, however, if you assume that this continues to hold for other stages launched from stages 2, 3, 4 or 5. That is, if you assume the orientation of an arbitrary stage Q when launched from an arbitrary stage S is:
Observationally, it doesn't work out this way in the game. Consider the following design, for example:
Stage | Duration | Speed | Thrust | Rotation | Axis | Color | Parent | Direction | Rockets | Reps | Offset |
1 | 3 | 30.78 | 0 | 0 | right | none | |||||
2 | 3 | 10.26 | 0 | 0 | right | none | 1 | left | 1 | 1 | 0 |
3 | 3 | 10.26 | 0 | 0 | right | none | 2 | left | 1 | 1 | 0 |
If a new rocket's orientation is derived solely from its parent rocket's orientation at launch time, using a fixed operation, you would expect the following orientation of these rockets:
Observationally, however, it turns out that D continues to point to the sky! That is:
In terms of matrix operations:
In other words, it seems the operations depend in part on the parent rocket's orientation in worldspace, rather than the child rocket's orientation being a precisely defined operation away from the parent rocket regardless of its orientation in worldspace. Stage 2 is found by rotating stage 1's F to stage 1's U (around LR axis) and then from stage 1's U to stage 1's L (around F-thrust axis) as expected. But now that stage 2 isn't pointing its F to the sky, stage 3 skips a step and just rotates around the sky-ground axis (colinear with the F-thrust axis of stage 1). Basically, when firing left: "does D point to the sky? No? Then make it so. Does D already point to the sky? Then leave it that way." That dastardly, devious D... This harkens back to the statement elsewhere that left/right rotations are relative to the ground rather than to the rocket. Such a rotation is fine for a rocket that's already horizontal, but that code couldn't be used for a vertical rocket. Launching left from stage 1 would still launch in the forward (skyward), as would launching left from that, and so on.
Part of the trouble with the preceding explaination is that it attaches U/D/L/R directions to the rocket at the time it is launched. The game actually determines these directions for a parent stage at the time a child stage is launched. If a parent stage is rotating, the U/D/L/R directions relative to the rocket will change as it rotates. Short example, a rocket that is pointing mostly skyward and a bit north has a down direction that is mostly south (and a bit skyward). As it rotates past vertical and because mostly skyward and a bit south, the down direction flips to be mostly north (and still a bit skyward). The rocket was not rotating left or right, but the U/D/L/R directions just rotated 180 degrees left (or right)
Up and Down rotations work similar to the launch directions Up and Down. However, there are two important 'bugs'.
One is that when rotating up, the forward direction will initially move towards the launch down direction (which will be towards the sky - and probably would have made sense if you hadn't just finished learning that down points towards the sky). Likewise rotating down will initially rotate the forward direction towards the ground.
The second is that the thrust direction will rotate in the opposite direction of the forward direction. So in stage 1, when forward starts pointing skyward and launch up is pointing north, rotating 45 degrees up will put the forward pointing in a north-sky direction, while the rocket will be accelerating in a south-sky direction. Rotating 90 degrees will put forward pointing straight north, while the rocket accelerates straight south. A full 180 degress will cause the vectors to match up again, with the rocket now pointing and accellerating straight towards the ground.
Left and right rotation does not use the rocket's forward direction. Instead, the rocket will rotate left or right around an imaginary vertical line that goes through the rocket from ground to sky. For a rocket that is currently parallel to the ground, the results will be similar to what you'd expect. But for rockets that are pointed at least in part toward the sky or gound, the rotations will seem a bit strange as the rocket spins around with its nose still pointing in the air (or stuffed towards the ground). And for a rocket that is vertical (straight towards the sky or ground), rotating left or right will not have an effect (which is why a stage 1 left/right rotation doesn't seem to do anything).
Stage | Duration | Speed | Thrust | Rotation | Axis | Color | Parent | Direction | Rockets | Reps | Offset |
1 | 3 | 30.78 | 0 | 0 | right | none | |||||
2 | 1 | 0 | 0 | 180 | up | none | 1 | left | 1 | 1 | 0 |
3 | 2 | 20.58 | 0 | 0 | right | none | 2 | up | 1 | 20 | 0 |
You'd expect a single continuous arc (like a squished-by-gravity half circle), wouldn't you? How about two discontinuous arcs like squished-by-gravity quarter circles (but even more bizarre than that!)?
There is also one more effect going on. If one of the child rockets is launched when stage 2 has rotated exactly 90 degrees, then no direction is more groundward than any other. To determine which direction to pick, the parental history is checked for what the last non-vertical forward direction was. In this case stage 1 was also always vertical, so the default vector is used (which says up is north). So of the 20 stage 3 rockets, 9 are launched in a ground/west direction, 1 is launched north, then 10 are launched in a ground/east direction.
- I think this is the thing that Yargh pointed out a little while ago. If you added another stage as a down launch and made it into a pinwheel, you'd see the up launches firing as you see in the picture (always toward the ground), and the down launches firing toward the sky. - Gardiner
Name | Creator | Date | Size | Description |
---|---|---|---|---|
doublearc.jpg | Ashmael | April 26, 2004 1:48 pm | 51398 | Double arc? Why not one? |
initial | Ashmael | April 26, 2004 10:11 am | 2461 | (delete me) |
initial-ll-actual.png | Ashmael | April 26, 2004 12:30 pm | 4242 | Initial-Left-Left actual orientation |
initial-ll-expect.png | Ashmael | April 26, 2004 12:24 pm | 4362 | Initial-Left-Left expected orientation |
initial-udlr.png | Ashmael | April 26, 2004 11:24 am | 4713 | Orientations after stage 1 fired up/down/left/right |
initial.png | Ashmael | April 26, 2004 10:14 am | 2461 | Initial launch orientation figure. |