Got it, very easy to add!!
Recipe
In short (try only if you feel you’re skilled enough):
1.) use a tool which helps counting the json array sizes for you like this one:
http://jsonviewer.stack.hu/
2.) In the “nodes” array:
Append the pilot/copilot entry.
You can copy this entry from the LOD01.gltf file (usually it is the last node but you can search the content with “PILOT_0” and/or “PILOT_1”.
3.) In the "scenes": [ { "nodes": [
array (it should be right after the nodes
array seen above):
Append the new node index!
Example with the default C152
Loading the C152_cockpit_LOD00.gltf
file in the online editor reveals there are 247 nodes (numbered 0 to 246)
original last node
"translation": [
-7.15255737e-7,
0,
-1.1920929e-7
],
"rotation": [
-1.921919e-8,
1.20119947e-9,
-3.00299874e-9,
1
],
"scale": [
6.202617,
6.20261765,
6.20261765
],
"mesh": 229,
"name": "NAV_Knob_OnOff_1"
}
Therefore appending the copilot entry found in the LOD01 file makes it node # 247.
added copilot node
...
"mesh": 229,
"name": "NAV_Knob_OnOff_1"
},
{
"translation": [
-0.213849753,
-0.133827746,
0.09663421
],
"rotation": [
0,
0,
0,
1
],
"scale": [
1,
1,
1
],
"name": "PILOT_1"
}
Just append 247 in the nodes
array which ends like this:
237,
239,
241,
243,
245,
247
You’re done!
“translation” values
This is a tuple of XYZ offsets in meters:
- 1st value is +left
- 2nd value is +up
- 3rd value is +fwd
It is very easy to reposition the model:
- edit the value and save the file
- open the developer mode Aircraft Selector (can keep it open during trial & error)
- just press the Load button
Now I’ll explore passengers…