183
edits
(→Status) |
No edit summary |
||
Line 37: | Line 37: | ||
}}</ref>) | }}</ref>) | ||
= Changing the view point = | |||
By default, the view point will be at (0,0,0), so the view point will be exactly on the bottom for many models. Though this might be useful for analysis purposes, a raised view point is more interesting. The view point can be changed by adding the following code to the addons main.nas file: | By default, the view point will be at (0,0,0), so the view point will be exactly on the bottom for many models. Though this might be useful for analysis purposes, a raised view point is more interesting. The view point can be changed by adding the following code to the addons main.nas file: | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
... | |||
if (type != "multiplayer") | |||
color = { text: { color: { red: 0.5, green: 0.8, blue: 0.5 }}}; | |||
# move view point above back of vehicle. | |||
if (getprop("/sim/current-view/name") == "Model Cockpit View" and name) { | |||
if (string.match(name,"*gsvehicle*")){ | |||
#Ground Service vehicle | |||
setprop("/sim/current-view/z-offset-m", 20); | |||
setprop("/sim/current-view/y-offset-m", 7); | |||
} else if (string.match(name,"*carrier*")){ | |||
setprop("/sim/current-view/z-offset-m", 110); | |||
setprop("/sim/current-view/y-offset-m", 47); | |||
} else { | |||
#Aircraft? | |||
setprop("/sim/current-view/z-offset-m", 60); | |||
setprop("/sim/current-view/y-offset-m", 17); | |||
} | |||
} | |||
if (name) | |||
gui.popupTip(name, 2, color); | |||
... | |||
</syntaxhighlight> | </syntaxhighlight> | ||
The offset values shown here are just arbitrary. | |||
= References = | = References = |
edits