Here is the sample version 2. Much plainer and easier!
Deezire, please update
my tutorial topic.
1. Edit the ChinaVehicle.ini, add the OverWater Draw module and the TroopCrawlerWaterLocomotor into the Crawler.
Code:
Object ChinaVehicleTroopCrawler
Draw = W3DTruckDraw ModuleTag_01
...
Draw = W3DModelDraw ModuleMod_OverWater
DefaultConditionState
Model = NVTCrawler_W
End
AliasConditionState = MOVING
ConditionState = OVER_WATER
ParticleSysBone = TreadFX05 AmphibWaveRest
ParticleSysBone = TreadFX06 AmphibWaveRest
End
ConditionState = OVER_WATER MOVING
ParticleSysBone = TreadFX05 AmphibWave
ParticleSysBone = TreadFX06 AmphibWave
End
End
...
Locomotor = SET_NORMAL TroopCrawlerLocomotor TroopCrawlerWaterLocomotor
2. Edit Locomotor.ini, create the locomotor in water.
Code:
Locomotor TroopCrawlerWaterLocomotor
Surfaces = WATER
Speed = 30 ; in dist/sec
SpeedDamaged = 25 ; in dist/sec
TurnRate = 90 ; in degrees/sec
TurnRateDamaged = 60 ; in degrees/sec
Acceleration = 30 ; in dist/(sec^2)
AccelerationDamaged = 20 ; in dist/(sec^2)
Lift = 120 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 50 ; in dist/(sec^2)
MinTurnSpeed = 10 ; in dist/sec
PreferredHeight = -7
AllowAirborneMotiveForce = Yes ;
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = HOVER
PitchStiffness = 0.9 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.95 ; stiffness of the "springs" in the suspension side to side.
PitchDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
RollDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardVelocityPitchFactor = -0.1 ; How much velocity will cause the front to lift/dip
LateralVelocityRollFactor = 0.1 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = No ;
End
A new w3d file named as NVTCrawler_W.w3d, in which there are only 2 bones, is used in this sample. please download it
HERE. .