Skip to content

SpotlightAngle

Width of the arc a sweeping spotlight covers before reversing, in radians.

Specification
Applies to
global rules
File
rules.ini
Section
[General]
Value
floating point
When omitted
20

SpotlightAngle sets how wide a sweeping spotlight swings. The beam starts pointing straight ahead of its structure and turns to one side about a pivot that SpotlightMovementRadius places behind the structure. Once it has turned past half this angle, it slows by SpotlightAcceleration each frame until it stops, then turns back. It does the same on the other side, so the sweep is centered on the direction the structure faces.

The beam only starts slowing after it passes the half angle, so the sweep is wider than this value. The overshoot grows with SpotlightSpeed and shrinks as SpotlightAcceleration rises. The angle is also measured at the pivot, so the beam covers a still wider angle as seen from the structure. With the shipped rules, the beam turns about 34 degrees about its pivot, which is about 90 degrees as seen from the structure.

rules.ini
[General]
SpotlightAngle=1.05 ; an arc of about sixty degrees before the overshoot

Only a structure whose type sets HasSpotlight=yes has a beam. The angle applies only while the beam sweeps. A beam set to circle its structure or follow a target does not use it.