219
edits
m (→Lights: Corrected typo in "FlightGear") |
(More information about using geometry object for axis.) |
||
Line 107: | Line 107: | ||
The axis line should be balanced, i.e. it should protrude equal amounts. The axis line should be normalized (i.e. 1m) as its length acts as a factor (affecting translate animations). | The axis line should be balanced, i.e. it should protrude equal amounts. The axis line should be normalized (i.e. 1m) as its length acts as a factor (affecting translate animations). | ||
The syntax for this is | The XML syntax for this is: | ||
<source> | <source> | ||
<axis> | <axis> | ||
Line 113: | Line 114: | ||
</axis> | </axis> | ||
</source> | </source> | ||
If the <code><axis>...</axis></code> section is omitted entirely, <code>{object-name}-axis</code> will be used by default, where <code>{object-name}</code> is the name of the object being animated. In the earlier example this would be <code>Rudder-axis</code>. | |||
In the '''.ac''' file, specify a SURF with type (bottom 4 bits, 0=polygon, 1=closedline, 2=line) set to 2, and two vertices that define the axis. For example: | |||
OBJECT poly | |||
name "aileron.l-axis" | |||
numvert 2 | |||
3.2077502191170844 0.18160835055097943 4.055616960642423 | |||
2.6758650763079 0.28024033462188946 6.477876098622225 | |||
numsurf 1 | |||
SURF 0x12 | |||
mat 0 | |||
refs 2 | |||
0 0 0 | |||
1 0 0 | |||
kids 0 | |||
Once the object-name used for the axis has been processed the geometry object will be hidden. This also allows a visual check for any axis objects that are not yet assigned. | Once the object-name used for the axis has been processed the geometry object will be hidden. This also allows a visual check for any axis objects that are not yet assigned. |
edits