VoxelBarrelOffsetToBarrelEnd
Where a building with a voxel barrel creates its shots.
- Applies to
- BuildingType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- point (x,y,z)
- When omitted
0,0,0
VoxelBarrelOffsetToBarrelEnd sets where a BarrelAnimIsVoxel=yes building’s shots start: the end of its barrel. The projectile is created there, the firing solution is measured from there, and the fire animation and laser beam appear there. It replaces the positions that PrimaryFireFLH gives other buildings.
The value is three whole numbers, X,Y,Z, in leptons, 256 to a cell. They are measured from the point where the barrel model is hung, which VoxelBarrelOffsetToBuildingPivotPoint, VoxelBarrelOffsetToRotatePivotPoint and VoxelBarrelOffsetToPitchPivotPoint set together. The offset turns and elevates with the barrel:
Xruns out along the barrel.Yruns to the barrel’s left.Zruns at right angles to both.
VoxelBarrelScale multiplies all three, so a barrel drawn smaller also fires from closer in. TurretAnimX and TurretAnimY move the point along with the barrel. Unlike the three pivot offsets, this offset does not change how the barrel is drawn.
[MYARTILLERY] ; a BuildingType registered in [BuildingTypes]BarrelAnimIsVoxel=yesVoxelBarrelScale=.75VoxelBarrelOffsetToBarrelEnd=350,75,0 ; at .75 scale, the shot starts 262 leptons along the barrelA Burst weapon alternates between two barrels. The first shot of a burst uses Y as written and the second uses -Y. A third shot and any after it start on the barrel’s center line, at Y = 0.
A PrimaryFirePixelOffset in the building’s art entry takes precedence over this key.