UPDATE, Dec 30, 2022: This release completely supersedes my earlier one, and is named differently so that it resides higher up in your mods listing in order that the included classfiles do not get ignored. Delete the old mod, if you have it!
The Java has been corrected for the proper compass card I provide, and also incorporates a delayed response as well as bank/pitch limits to free rotation.
The 'dirtiness', surface normals and obscuration by intervening objects for the compass glass is fixed.
-----------------END of UPDATE--------------------A screenie from the mesh viewer utility (hence the magenta external skin). Of note:
- New (dirty) glass cover, with lubber line.
- Correct conical taper on the card.
- The card has more polygons for smoother roundness.
- Improved texture on the card.
- Number order is now correct (but does the card spin the wrong way?)
- Instead of the former nearly 180 degrees being seen, the more correct ~120 degrees is visible.
Get it here (This is a differently named archive, replacing the first; delete your older version):
https://www.mediafire.com/file/l3roq0bx6137zrf/%25210_Stearman_compass_fix.7z/fileFrom the included, updated readme file:
Stearman magnetic compass fix, for Asura's new cockpit introduced in B.A.T. 4.2.1
---------------------------------------------------------------------------------
IMPORTANT NOTE! Due to now including class files, I've renamed the folder so that it will reside above any B.A.T. folders containing the same classfiles. This means that the old mod is completely superseded, and should be deleted.
This archive replaces my first. (I should have thought ahead and named it appropriately.)
==================================================================================
FIRST ROUND, Dec 29, 2022
This little mod began as a fix for a misplaced digit on the magnetic compass card.
While addressing that, it was discovered that the numbering was reversed. (It remains to see if the rotation direction is correct or not!) And on top of that, the scale was doubled and repeated, meaning the 360 degrees was divided into 720 degrees!
While on this task, I decided to:
- Improve the card texture
- Give the card the correct conical taper common to magnetic compasses
- Enlarge the card so that the correct ~120 degrees is seen through the window (as opposed to near 180 degrees previously)
- Supply a new glass window upon which the lubber line is present (to facilitate a more accurte reading)
The two .him files are present only bacause the larger compass cards required to push them farther inside the instrument, lest they protrude outside.
The two Body.msh files have only had the CAMERA and CAMERAAIM hooks moved a little farther forward. If you don't like this, simply remove:
Body.msh
BodyC.msh
==================================================================================
SECOND ROUND, Dec 30, 2022
Upon receiving the necessary plane folder and classes so as to install this plane into my B.A.T. 4.0 game I could address the compass code in the cockpit classes.
To compensate for both the doubled (720 degree) scale and it's reversal in printing, I removed the compensatory -0.5 factor in the update method. Now the rate and direction of compass card rotation is correct.
I've implemented a check on bank and pitch angle; when either exceeds 45 degrees the compass card locks in position until said angle decreases.
I've implemented hysteresis, or a slowed response common to fluid-filled magnetic compasses.
-------------------------------------
The compass glass texture has had the 'dirtiness' reduced in intensity. And my formerly incorrect surface normal orientation (which caused the intensity of the 'dirtiness' to be strongest at inappropriate illumination angles) is fixed.
-------------------------------------
The corrected CompassGlass.mat file now has
tfTestZ 1
Which makes the glass properly lie behind any obstructors in front of it.
-------------------------------------
The Pit2.mat file, applying to the texture for inside-the-cockpit structures, has had the specularity reduced from 0.3 to 0.15, as in
Specular 0.15 //0.3
If you don't like this, and want to go back to the original, make this line read
Specular 0.3
-------------------------------------
The six classfiles comprise the two cockpit classes. I include the two cockpit java files, with my changes documented.
In the cockpit classes I added the 6dof code, so as to increase the limits in most directions over those for the default ranges. You can now move about a bit more freely.
==================================================================================
WxTech
Dec 30, 2022