API reference
EnvironmentProperties
Runtime environmental fields and their units.
Source: src/Ballistics/EnvironmentProperties.cs.
| Member | Type / access | Units |
|---|---|---|
m_gravityInMetric | float, read/write | m/s²; normally negative. |
m_airPressureInMetric | float, read/write | kPa. |
m_temperatureInMetric | float, read/write | °C. |
m_windSpeedInMetric | Vector3, read/write | km/h in world X/Y/Z. |
MeasurementUnit | SniperAndBallisticsSystem.MeasurementUnits, read | Inspector display unit choice. |
Create assets through Create → RSB → EnvironmentProperties. The scene system clones its assigned asset in Awake; access that clone through GlobalEnvironmentProperties for runtime changes.
var environment = SniperAndBallisticsSystem.instance.GlobalEnvironmentProperties;
environment.m_windSpeedInMetric = new Vector3(20f, 0f, 0f);WindVector is not a current member. Pressure and temperature are used by the stability calculation; they are not parameters of GetDragVector. Changing gravity or other environmental values does not automatically invalidate cached zero trajectories.