Page 1 of 1

[2.0.18] Turret rotates past its firing arc limit.

Posted: Thu Nov 14, 2024 7:49 pm
by wodzu93
Turret that has limited firing arc, no turret base direction (turret_base_has_direction = false) and matches any of these situations:
  • turn_range >= 1/4 AND placeable in four directions (N, E, S, W)
  • turn_range >= 1/8 AND placeable in eight directions (N, NE, E, SE, S, SW, W, NW) ("building-direction-8-way" flag)
  • turn_range >= 1/16 AND placeable in sixteen directions (has "building-direction-16-way" flag)
will shift its facing direction, and therefore firing arc, when tracking a target sufficently close to the left/right edge of it's arc, and STAYS facing that direction after target leaves or dies.

Here's the demonstration, with an ammo turret prototype with:
  • "building-direction-8-way"
  • turn_range = 1/3 (exceeds 1/8 for 8-way directional placing)
  • turret_base_has_direction = false
Turret is placed facing NW, and after leading a biter group past it, rotates towards NE and stays facing that direction, way past it's supposed firing angle. This would ruin any defense line after any attack, since it no longer faces the desired direction.
Anim2D.gif
Anim2D.gif (23 MiB) Viewed 376 times


Note, changing "turret_base_has_direction" to "true" fixes this behaviour, but has a side effect of rotating the collision box of the turret base, which is not desired for my use case.

Re: [2.0.18] Turret rotates past its firing arc limit.

Posted: Thu Nov 14, 2024 8:00 pm
by Klonan
wodzu93 wrote: Thu Nov 14, 2024 7:49 pm Note, changing "turret_base_has_direction" to "true" fixes this behaviour, but has a side effect of rotating the collision box of the turret base, which is not desired for my use case.
Well, unfortunately that flag is exactly what control this behavior, so this is more of a feature request than a bug report, or at least, a currently unsupported case

I will move this to modding interface requests