MissileROTVar
| Flag: | MissileROTVar |
| File(s): | rules(md).ini |
| Values: | Floating point values: Any decimal number (clearer range should be added in Template:Values). |
| Applicable to: | General |
| |
Specifies the rate of turn (ROT) fluctuation percentage of guided missiles (projectiles with ROT greater than 0). As the missile travels, its ROT is recalculated every frame based on this variable: the larger the value, the higher the variation in the missile's ROT.
Note that on regular missiles the effect is barely noticable, even with extreme MissileROTVar values, as the ROT never falls below what's stated on the projectile's rules. The lower the projectile's default ROT, the more noticable the effect is. For example, projectiles with ROT=1 and a high enough variance (e.g. 2.0) causes the projectiles to randomly scatter around the target instead of hitting it perfectly.
Pseudocode
Simplified pseudocode:
currentROT = (sin(((frame % 15) / 3) * 2 * π) * MissileROTVar + MissileROTVar + 1) * ROT