Adjusting the Z-Offset in Views

11 May 2020 18:05 - 11 May 2020 18:06 #46521 by Algernon
Does anybody know why FG refuses to accept overwrite Z-offset values in views? Trying to adjust Helicopter View to sit behind a very long aircraft carrier, and whilst it happily accepts my x- and y- offset values, the z- offset steadfastly refuses to change.

Whole code block:
<view n="1">
  <name>Helicopter View</name>
  <enabled type="bool">true</enabled>
  <type>lookat</type>
  <config>
    <from-model type="bool">false</from-model>
    <from-model-idx type="int">0</from-model-idx>
    <eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
    <eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
    <eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
    <eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
    <eye-pitch-deg-path>/orientation/pitch-deg</eye-pitch-deg-path>
    <eye-roll-deg-path>/orientation/roll-deg</eye-roll-deg-path>
    <at-model type="bool">true</at-model>
    <at-model-idx type="int">0</at-model-idx>
    <at-model-heading-damping type="double">0.0</at-model-heading-damping>
    <ground-level-nearplane-m type="double">0.9f</ground-level-nearplane-m>
    <x-offset-m>0</x-offset-m><!-- right -->
    <y-offset-m>80</y-offset-m><!-- up -->
    <z-offset-m>-200</z-offset-m><!-- back -->
    <pitch-offset-deg>-5</pitch-offset-deg>
    <default-field-of-view-deg>60</default-field-of-view-deg>
  </config>
</view>

I noticed that some aircraft use an alias for this, so I tried that too...
    <x-offset-m>0</x-offset-m><!-- right -->
    <y-offset-m>80</y-offset-m><!-- up -->
    <z-offset-m alias="/fuck/you/flightgear" />

...but still no joy. Anybody ever get this to work?

Please Log in or Create an account to join the conversation.

11 May 2020 18:07 #46522 by StuartC
you need an offset value because the carrier is to big

Please Log in or Create an account to join the conversation.

11 May 2020 18:10 #46523 by StuartC
like this

<!-- Shift the camera target point back -->
<view n="1">
<config>
<target-z-offset-m archive="y" type="double">15.0</target-z-offset-m>
<pitch-offset-deg archive="y">15</pitch-offset-deg>
</config>
obviously change View 1 to suit whatever view number your using.

Please Log in or Create an account to join the conversation.

11 May 2020 18:14 - 11 May 2020 18:14 #46524 by Algernon
That just moves the centre point for the view rotation aft. I want to pull the viewer position back beyond the stern, not the target position. Otherwise, rotating the view ends up inside the hull, looking at the normals the wrong way. I want to be able to rotate the view right around the ship.

Please Log in or Create an account to join the conversation.

11 May 2020 21:59 #46529 by Richard
From looking at the view logic in the core maybe use target-#-offset-m instead of #-offset-m

Also setting eye-fixed may help as you can set the eye-#-deg-path (lat/lon/alt)

I've got some WIP changes to the core to identify the nearest carrier to the aircraft - the idea is to be able to have a moving LSO view.

Generally improving carrier views is something that I'm obviously quite keen on.

Maybe if you send me a more complete example I can try to debug it directly

Please Log in or Create an account to join the conversation.

12 May 2020 07:33 #46531 by StuartC
If we could ever figure out why we cant add working Cats to ouir own carriers, we could have the Hermes and classic cat operating carriers out there.

Please Log in or Create an account to join the conversation.

12 May 2020 09:32 #46532 by Algernon

StuartC wrote: If we could ever figure out why we cant add working Cats to ouir own carriers, we could have the Hermes and classic cat operating carriers out there.

I need to have a close look at the Nimitz today as some of it appears to be broken in 2020.1 so I'll see if I can see how it's done...

Please Log in or Create an account to join the conversation.

12 May 2020 09:39 #46533 by StuartC
We know how its done but when you transfer it, it gets broken and the cat has zero power.

Please Log in or Create an account to join the conversation.

12 May 2020 09:47 #46534 by Algernon

Richard wrote: From looking at the view logic in the core maybe use target-#-offset-m instead of #-offset-m

Unfortunately that doesn't give the desired effect - as above in reply to Stuart, that positions the point upon which the "eye" is fixed and rotates around. Moving that just means that you can't then rotate the view right around the ship, the viewer ends up inside the hull which is not desirable.

Also setting eye-fixed may help as you can set the eye-#-deg-path (lat/lon/alt)

Yeah, I was looking at that and I think it could be an interesting approach, but I'm not convinced it will help in this particular case. I will be playing with it today.

I've got some WIP changes to the core to identify the nearest carrier to the aircraft - the idea is to be able to have a moving LSO view.

Now that will be handy...

Maybe if you send me a more complete example I can try to debug it directly

That was it, I'm afraid! The first thing I tried to do on my new carrier "aircraft" was to sort out the views and came to a crashing halt almost immediately!! Just to be clear, this is the "player" or "aircraft" part of the MP carrier, under the control of a player, so it should behave just as an aircraft does in terms of views. The other side, the MP scenario, will come later.

I'm going to try some more things today, but what appears to be happening is that the x-offset-m and y-offset-m properties can be overwritten fine (note this is helicopter view, view number 1) but the z-offset-m remains at the default value for that view (-25). The only other thing to mention is that this "aircraft" has a null FDM - that shouldn't be a factor, but you never know...

Please Log in or Create an account to join the conversation.

12 May 2020 09:49 #46535 by Algernon

StuartC wrote: We know how its done but when you transfer it, it gets broken and the cat has zero power.

OK, I'll start another thread so we can get as much info as we already know about it in one place, and perhaps we can solve it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.137 seconds
Powered by Kunena Forum

Latest Forum Posts

PM Notifications

You are not logged in.

PM Mailbox

You are not logged in.

Latest updated downloads