Skip to content

VoxelBarrelOffsetToPitchPivotPoint

Where a building's voxel barrel sits once it has elevated.

Specification
Applies to
BuildingType
File
rules.ini
Section
[<ObjectType ID>]
Value
point (x,y,z)
When omitted
Context-dependentNo value is established. A BuildingType whose rules never assign the key keeps whatever the memory it was allocated from held.

Three whole numbers, X,Y,Z. A BarrelAnimIsVoxel=yes building places its barrel with four moves in order: out from the building by VoxelBarrelOffsetToBuildingPivotPoint, a turn to the building’s facing, out by VoxelBarrelOffsetToRotatePivotPoint, an elevation to the barrel’s pitch, and out by this offset, with the model itself hanging off the end of that.

This one is applied after the elevation, so it rides up and down with the gun. X runs out along the pitched barrel, Y to its left and Z square to it — the place in the sequence that PBarrelLength occupies for an object with no voxel barrel, with two more components to it. The point it lands on is where the barrel model is hung, so it is the offset that decides which part of the barrel stays still while the rest swings.

rules.ini
[MYARTILLERY] ; a BuildingType registered in [BuildingTypes]
BarrelAnimIsVoxel=yes
VoxelBarrelOffsetToBuildingPivotPoint=4,2,3
VoxelBarrelOffsetToRotatePivotPoint=2,0,0
VoxelBarrelOffsetToPitchPivotPoint=15,0,-8 ; forward along the barrel and slightly below it
VoxelBarrelOffsetToBarrelEnd=350,75,0

The three pivot offsets are read at two scales. Drawing takes them as model units, of which there are 32 to a cell, while the firing point takes the same numbers as leptons, of which there are 256 — so this offset moves the drawn barrel eight times as far as it moves the shot.