VehicleComponent is a building block of NWH Vehicle Physics 2.
VehicleController is a collection of
VehicleComponents, which includes
SoundComponents - both of which inherit from
For class reference click here.
VehicleComponentthat is enabled is updated.
isOncan be used instead.
lodIndexvalue is lower than
vehicleController.activeLodIndexit will be enabled, otherwise it will be disabled.
lodIndexto a value less than 0 to ignore LODs.
VehicleComponents that have
isOn set to
false are disabled and can not be enabled by LODs.
Turning components off should be used for components that will never be used.
VehicleComponent has a state bar which is visible in play mode:
This is where the state of the
VehicleComponent can be checked and changed. Note that changing the state through state bar only affects runtime values and will revert after exiting play mode. The state bar is intended for previewing the current state and testing different values during run-time. For persistent state check StateSettings.
Enabledbutton is greyed out as the LODs determine if the component will be enabled or disabled.
StateSettingsfor each vehicle can be assigned under VehicleController ⇒ Settings tab.
StateSettingson StateSettings page.
VehicleComponent state through scripting following can be done:
myVehicleComponent.IsEnabled= myBoolValue; myVehicleComponent.IsOn = myBoolValue; myVehicleComponent.LodIndex = myIntValue;