W3D Model Direction Bugs
If you have ever used the AVrepairDr model, you will notice that it's tire bones don't rotate correctly. Instead of rolling on their rims like normal wheels, they spin sideways.
If you have ever tried using UVPowTruck.W3D and tried launching a projectile object that uses MissileAIUpdate from it's MuzzleFX bone, you will have noticed that it shoots out backwards and goes through the POW truck instead of going forwards towards the target.
If you have ever tried to move the aircraft carrier, you will have found that it moves backwards, with the wake particlesystems streaming out forwards in the direction of travel instead of going backwards like normal ship wakes.
If you have tried to make the ambulance gun pitch with TurretPitch = TURRETEL, you will have noticed that instead of pitching up or down, it rolls over on it's side.
If you have ever tried launching projectile objects that use MissileAIUpdate, using a weapon, from the WeaponA* or Missile* bones on the AVWarthog model, you will have seen that the projectiles fly out sideways.
If you have ever tried making the technical gunner able to pitch his gun up or down, you will have noticed that it pitches in the opposite direction, so that when firing at targets above him, he points his gun into the ground, and when firing at targets below him, he points his gun into the air.
The cause of all these bugs is to be found in the direction of pivots and/or bones/sub-objects in the W3D models.
When whoever made those models made them, they must have drawn them facing the wrong direction. In some cases, like with the tires on the AVRepairDr or the Missiles on the AVWarthog, they then rotated the sub-objects to face the right direction, but forgot to set their pivots to the world directions. In other cases, like the aircraft carrier and technical gunner, they didn't even rotate them.
Because of this EA games had to make special provisions in their game engine so that the following could be done:
For the technical gunner, the draw module takes TurretArtAngle to be able to cope with the model being rotated 180 degrees backwards, to make the gunner face the target instead of turning his back to it.
An undocumented parameter, TurretArtPitch, is also available, but when used in conjunction with TurretArtAngle, it has unexpected results. You can to some extent fix it using both TurretArtPitch in the Draw module and NaturalTurretPitch in the AI module, but you have to experiment a lot to get it right. I think in the end i managed to get the gunner to pitch and turn in the right direction but his gun was upside down.
For the aircraft carrier, the existence of carrier wake particle systems in ParticleSystems.ini shows that EA games intended for it to be movable. However, they gave up and made it static.
I partially fixed it in
a map.ini by declaring the chassis a turret and using turret art angle to rotate it 180 degrees, and making new particle systems that are not attached to the model, but i had to hide all the sub-objects not attached to the chassis as i could not rotate them.
For the A-10 thunderbolt strike, EA games had to make special functions in their game engine so that the OCL for it could launch the missiles without using a weapon. Intead of firing a weapon, the A10 calls the special game engine code that makes the missiles appear at the bones, then makes them move to the OCL drop location, then makes each missile fire a weapon to do the damage - this is the A10 missile weapon in weapon.ini that only does damage and fires no projectiles. This is also why the A10 does not have a missile weapon in it's weaponset, only the gun.
Compare the A10 strike OCL with the SUPERWEAPONNapalmStrike OCL, which makes the jets fire a weapon from their weaponset to launch the napalm missiles.
Instead of going through all that trouble, all EA games needed to do was fire up their 3D model editing software and rotate the bones and pivots to face the right direction. This suggests that their 3D model making team wasn't talking to their game engine team, perhaps some office politics going on there?
In order to fix the tires on the AVRepairDr, the muzzle on the UVPOWTruck, the TurretEL on AvAmbulance, and the sideways firing missiles on the AVWarthog, do this:
Import model into RenX/Gmax (remember to also do this for the damaged state models).
Click the 3rd tab in the right hand pane, the one which says Hierachy when you mouseover it.
Click the "Affect Pivot Only" button under it.
Select each wrongly pivoted bone individually, do not group select, then click the "Align to World" in the Alignment buttons section in the right hand pane.
Re export to W3D. Problem solved.
To fix the technical gunner and aircraft carrier and other models facing the wrong way, select the whole scene, then use the rotate tool in the top button bar, then manually type in 180 into one of the X Y or Z boxes at the bottom until you get the desired effect, then set all the pivots of all objects to align to world, but not those bones that need to face in non-world directions (like aircraft parking bones or movement bones on airfields).
Next, remember to edit the inis to use the new directions.