miscellaneous aircraft behaviour fixes and improvements
Posted: 24 Aug 2014, 02:14
this is about aircraft behaviour. Currently it has a few issues and stuff we should be able to control but are not, mostly related to movement.
1 --- make possible to set minimal attack distance for unit OR make possible to set primary weapon (for the same purpose)
http://springrts.com/mantis/view.php?id=3900
not directly related to aircraft but could allow gunships to have short range and long range weapons (currently if you use a primary short range heavy weapon + secondary long range wimpy missiles the unit will hover at the range of the longest weapon so the primary weapon won't fire )
2 --- aircraft gunships "snap" instantly to horizontal position when ordered to stop after attacking
http://springrts.com/mantis/view.php?id=4232
3 --- fighter aircraft fly too low and sometimes bump off the ground when engaging targets
http://springrts.com/mantis/view.php?id=4516
- there should be an "attackRunLength" unitdef to set how far fighter aircraft try to keep facing the target to fire non-turret weapons when strafing before trying to restore normal cruise altitude (default 100)
for example, a short length of 50-100 could be used for aircraft that only fire once per run, and a longer length of 300+ could be used for aircraft that fire repeatedly (ex: 2 missile salvos or a long machinegun burst) on the same dive
- there should be an "afterAttackRunLength" unitdef to set how far fighter aircraft should fly after a strafing run (after attackrunlength) before they try to turn to face their target again (default 400)
4 --- add isBomber unitdef to determine aircraft behaviour
http://springrts.com/mantis/view.php?id=4517
currently aircraft with weapons are considered to be "fighters" unless they carry weapons with weapontype AircraftBomb or TorpedoLauncher.
- add "isBomber" unitdef (defaults to False unless the unit contains the previously mentioned types of weapons): if true, aircraft do not try to pitch to face their target and behave like a bomber (they hover horizontally if gunship of fly above it like a bomber).
This is for aircraft that engage targets with weapons on top or belly turrets instead of bombs.
[EDIT: nevermind this one, all that was needed was to use the "upright=1" unit def]
[EDIT]
5 --- abs(airHoverFactor) should affect gunships' sideways movement speed during combat
http://springrts.com/mantis/view.php?id=4518
change airHoverFactor to affect units with airStrafe = true (regardless of whether they and can land or not) when they are engaging targets:
abs(airHoverFactor ) < 1 : strafe sideways slower
abs(airHoverFactor ) = 1 : current behaviour
abs(airHoverFactor ) > 1 : strafe sideways faster
it may be better to add an extra "airStrafeFactor" unitdef instead for that purpose as mod devs may want gunships that barely move when hovering and idle but strafe sideways fast and far when in combat
comments?
1 --- make possible to set minimal attack distance for unit OR make possible to set primary weapon (for the same purpose)
http://springrts.com/mantis/view.php?id=3900
not directly related to aircraft but could allow gunships to have short range and long range weapons (currently if you use a primary short range heavy weapon + secondary long range wimpy missiles the unit will hover at the range of the longest weapon so the primary weapon won't fire )
2 --- aircraft gunships "snap" instantly to horizontal position when ordered to stop after attacking
http://springrts.com/mantis/view.php?id=4232
3 --- fighter aircraft fly too low and sometimes bump off the ground when engaging targets
http://springrts.com/mantis/view.php?id=4516
- there should be an "attackRunLength" unitdef to set how far fighter aircraft try to keep facing the target to fire non-turret weapons when strafing before trying to restore normal cruise altitude (default 100)
for example, a short length of 50-100 could be used for aircraft that only fire once per run, and a longer length of 300+ could be used for aircraft that fire repeatedly (ex: 2 missile salvos or a long machinegun burst) on the same dive
- there should be an "afterAttackRunLength" unitdef to set how far fighter aircraft should fly after a strafing run (after attackrunlength) before they try to turn to face their target again (default 400)
4 --- add isBomber unitdef to determine aircraft behaviour
http://springrts.com/mantis/view.php?id=4517
currently aircraft with weapons are considered to be "fighters" unless they carry weapons with weapontype AircraftBomb or TorpedoLauncher.
- add "isBomber" unitdef (defaults to False unless the unit contains the previously mentioned types of weapons): if true, aircraft do not try to pitch to face their target and behave like a bomber (they hover horizontally if gunship of fly above it like a bomber).
This is for aircraft that engage targets with weapons on top or belly turrets instead of bombs.
[EDIT: nevermind this one, all that was needed was to use the "upright=1" unit def]
[EDIT]
5 --- abs(airHoverFactor) should affect gunships' sideways movement speed during combat
http://springrts.com/mantis/view.php?id=4518
change airHoverFactor to affect units with airStrafe = true (regardless of whether they and can land or not) when they are engaging targets:
abs(airHoverFactor ) < 1 : strafe sideways slower
abs(airHoverFactor ) = 1 : current behaviour
abs(airHoverFactor ) > 1 : strafe sideways faster
it may be better to add an extra "airStrafeFactor" unitdef instead for that purpose as mod devs may want gunships that barely move when hovering and idle but strafe sideways fast and far when in combat
comments?