BarrelAnimIsVoxel
Draws a building's gun barrel from a voxel model over its turret animation.
- Applies to
- BuildingType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- boolean
- When omitted
no
BarrelAnimIsVoxel=yes draws a building’s gun barrel as a voxel model over its turret animation. The turret itself stays an ordinary animation, named by TurretAnim. VoxelBarrelFile names the barrel model, unless the TurretAnim name yields a barrel name of its own, as that page explains.
[MYARTILLERY] ; a BuildingType registered in [BuildingTypes]Turret=yesTurretAnim=MYART_A ; an AnimType registered in [Animations]BarrelAnimIsVoxel=yesVoxelBarrelFile=MYARTBARVoxelBarrelOffsetToBuildingPivotPoint=4,2,3VoxelBarrelOffsetToRotatePivotPoint=2,0,0VoxelBarrelOffsetToPitchPivotPoint=15,0,-8VoxelBarrelOffsetToBarrelEnd=350,75,0The four VoxelBarrelOffset… keys and VoxelBarrelScale place the barrel on the building. Each frame, the barrel turns with the gun’s facing and tilts to the barrel’s current pitch.
Draw order
Section titled “Draw order”The building draws the turret animation and the barrel together, so they keep a consistent order as the gun turns. The barrel is drawn over the animation while the gun points anywhere from north-east round through south to south-west, and under it for the rest of the circle. The barrel uses a fixed depth bias; TurretAnimZAdjust does not move it.
Neither the barrel nor the turret animation is drawn while the building’s buildup plays, or once its deconstruction is past the first frame.
Where shots start
Section titled “Where shots start”Shots leave from the end of the barrel, which VoxelBarrelOffsetToBarrelEnd sets, in place of the position PrimaryFireFLH would give. PrimaryFirePixelOffset still takes precedence when the art entry sets it.