Added 'Still View', a new core view, number 8.
This view is like Helicopter View except that it does not change the view heading to match the aircraft, which makes it work much better for vertical flight, e.g. with the shuttle. The new view is disabled by default. Nasal/view.nas contains the new view config. defaults.xml: Added view 8 to list of views for which we default to Helicopter view's target offsets (so that they look at the centre of the aircraft).
This commit is contained in:
parent
dd80c82747
commit
4db50617ca
2 changed files with 15 additions and 2 deletions
|
@ -276,7 +276,7 @@ var manager = {
|
|||
# this allows Tower View AGL to work on aircraft that don't
|
||||
# know about it but need non-zero target-*-offset-m values
|
||||
# to centre the view on the middle of the aircraft.
|
||||
if (i==2 or i==3 or i==5 or i==7) {
|
||||
if (i==2 or i==3 or i==5 or i==7 or i==8) {
|
||||
set_default(helicopter_view, "config/target-x-offset-m", viewnode);
|
||||
set_default(helicopter_view, "config/target-y-offset-m", viewnode);
|
||||
set_default(helicopter_view, "config/target-z-offset-m", viewnode);
|
||||
|
@ -963,7 +963,7 @@ var fdm_init_listener = setlistener("/sim/signals/fdm-initialized", func {
|
|||
var zoffset = nil;
|
||||
foreach (var v; views) {
|
||||
var index = v.getIndex();
|
||||
if (index > 7 and index < 100) {
|
||||
if (index > 8 and index < 100) {
|
||||
globals["view"] = nil;
|
||||
die("\n***\n*\n* Illegal use of reserved view index "
|
||||
~ index ~ ". Use indices >= 100!\n*\n***");
|
||||
|
|
13
defaults.xml
13
defaults.xml
|
@ -708,6 +708,19 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<lookat-agl-damping type="double">2.2</lookat-agl-damping>
|
||||
</config>
|
||||
</view>
|
||||
<view>
|
||||
<!-- Similar to Helicopter View but does not change heading with
|
||||
aircraft, which avoide poor behaviour with vertical climbs, e.g. with
|
||||
Shuttle. -->
|
||||
<name>Still View</name>
|
||||
<enabled type="bool" userarchive="y">false</enabled>
|
||||
<type>lookat</type>
|
||||
<config>
|
||||
<from-model type="bool">false</from-model>
|
||||
<at-model type="bool">true</at-model>
|
||||
<z-offset-m alias="/sim/chase-distance-m"/>
|
||||
</config>
|
||||
</view>
|
||||
<menubar>
|
||||
<visibility type="bool" userarchive="y">true</visibility>
|
||||
<default include="gui/menubar.xml"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue