Klick hier für die deutschsprachige Version.
At this column you can learn to create your own egg-O-shOOter.
|<<< Object rotation 1 >>>|
Let's rotate a cup. Take the 'have a break-cup' and observe the specialties of rotations.
The first cup has no rotating speed, you will learn something about initialization process first:
ObjectNumber=1 #1#'Mach mal Pause' Tasse / Cup 'Have a break'
Save 'themes.txt', start level 1 and press the 'N'-key to rescan the file. The cup is tilted either to the right or to the left whenever you press the 'N'-key. That's alright, because the variable ObjectAMin/Max is 'bidirectional' and we did not type signed values. So the direction is 'diced' whenever the cup is initialized.
The rotation at the example given above is around the Z-axis, which is the axis pointing out of your screen. Further rotation axis are the X-(=horizontal) and Y-(=vertical) axis. The rotation axis is given by the variable ObjectRotAxis.
Set ObjectRotAxis=1 (=rotation around the X-axis) and rescan the file 'themes.txt' some times by pressing the 'N'-key. It seems that the cup is tilted in just one direction by now - is there no 'bidirectionality' given? The answer is that egg-O-shOOter still handles the angle like being 'bidirectional', you just can't see the difference! Hereat the flatness of the egg-O-shOOter universe is noticeable. There is no real 'front' and 'behind'.
Let's push the cup and let it rotate. That is done by setting the variable ObjectVRotMin/Max=30.
Now a little illusion of rotation around the X-axis will appear at your brain. Observe the cup and imagine it would rotate 'forward' - that should work. Let the rotation continue and imagine there would be a rotation 'backwards' - that should work as well. As seen at the static tilting, there is no difference between the two directions. Only if setting ObjectRotAxis=3 you will realize the difference. That's the disadvantage of a 2-dimensional world. The rotation axis around X- and Y-axis where implemented to realize the wing beat of the birds, which will be described later.
Let's play around with the variables ObjectMoveAMin/Max to limit the rotation:
Limited by those values, the cup starts rotating clockwise until the direction is inverted when reaching an angel of 45 degrees. The anticlockwise rotation is inverted when reaching an angel of -45 degrees.
Makes the cup rotate inside the once 'forbidden' area.
Makes the cup rotate almost twice around the axis before inverting the direction.
Causes nothing, because egg-O-shOOter always adds or subtracts 360 degrees to avoid the current angle from being outside -360 to +360 degrees.
|<<<Back to connected objects Continue with object rotation 2>>>|