Cockpit animations
Animating items in the cockpit is done by adding animation components to the cockpit game object, again you can do this is the editor or you can do it in a text editor
So far I have several components defined
CVTAnimatorComponent is used where you would have used Aircraft.Cvt in java code.
So this line of Java ....
this.mesh.chunkSetAngles("STREL_ALT_LONG", 0.0F, 0.0F, cvt(interp(this.setNew.altimeter, this.setOld.altimeter, paramFloat), 0.0F, 9144.0F, 0.0F, -10800.0F));
becomes this block of text in the cockpit game object
CVTAnimatorComponent_1
CVTAnimatorComponent
1
Root#Root#SpitfireMkIXcc:GameComponents
0
7
TargetMesh String STREL_ALT_LONG
ControlValue String Altitude
Minimum Float 0
Maximum Float 9144.0
Start Float 0
Finish Float -10800.0
Flags Int 1
For simpler animations I have the SmoothedAngleAnimatorComponent
this.mesh.chunkSetAngles("Z_Throtle1", -64.545403F * interp(this.setNew.throttle, this.setOld.throttle, paramFloat), 0.0F, 0.0F);
becomes
SmoothedAngleAnimatorComponent_5
SmoothedAngleAnimatorComponent
1
Root#Root#SpitfireMkIXcc:GameComponents
0
5
Plane Int 4
Scale Float -64.545403
Smoothing Float 0.8
Mesh String Z_Throtle1
Control String ThrottleSetting
The variable Plane defines which 3D plane you want the rotation to be applied in.
I am adding more animators all the time.