Weapon Firing Arcs Explained

Post here if you want to help developing something for FAF.

Weapon Firing Arcs Explained

Postby Resin_Smoker » 15 Sep 2014, 05:01

**** Please be aware that this is a WIP ***

Basic Definitions

Mesh The units 3D model that's visible to the player. This model is composed of "bones" that can sometimes move / rotate independently of the main object. Please be aware that each Mesh has a main bone that all other bones are attached and referenced from.

Bone A 3D object that's part of a units model that's are often used to define the movable parts of the model. Such as turrets, muzzles (recoil and effects) and limbs (used in animation).

Pitch The elevation angle (up or down) that's required to counter the pull of gravity as a projectile travels towards a target.

Yaw A movement around the yaw axis of a rigid body that changes the direction it is pointing, to the left or right of its direction of motion. Positive Yaw travels clockwise, while negative yaw travels counter-clockwise around the point of rotation.

Weapon Blueprint Definitions

HeadingArcCenter Controls what the weapon is allowed to target in reference to the heading of the unit. This is an offset (positive or negative) of the direction the units "mesh" main bone is facing. If not specified the center will be the turrets current centered (neutral) position instead.

HeadingArcRange Controls what the weapon is allowed to target in reference to the arc center, this is degrees on either side. If not specified, the range will be the turrets available yaw from it's centered position.

Note(1): HeadingArcCenter & HeadingArcRange are normally used together or not at all.
Note(2): Normally not used for weapons / turrets that have the same centered orientation as the units main bone. Example: used on units such as the Fatboy with left and right facing orientations.

SlavedToBody A booleen that specifies if the weapon is slaved to the units body, thus requiring the attacking unit to face the target to fire. Beyond this it works the same as HeadingArcCenter.

SlavedToBodyArcRange The angle a target can be in degrees from the center of an attacking unit before the attacking unit will have to reorient it's position before firing a given weapon.

Note(1): Normally used for the primary forward facing weapon only.
Note(2): SlavedToBody can be used without SlavedToBodyArcRange when the attacking unit must absolutely face a target before firing.

TurretPitch Current pitch position of a turret relative to its physical game-world mesh. (turrets mesh facing)

TurretPitchRange The angle amount up or down that the turret may travel. (Example: 30 degrees = 60 arc of fire or -30 to 30 pitch from center )

TurretYaw Current yaw position of a turret relative to its physical game-world mesh. (turrets mesh facing)

TurretYawRange The amount to the left or right that the turret may turn from its "center" position. (Example: 30 degrees = 60 arc of fire or -30 to +30 yaw from center)

Basic Firing Arcs

Below is a typical firing arc of a generic forward facing turret. (Yaw/Arc shown in blue, red Arrow denotes turret center and assuming that it's facing the front of the attacking unit)

Image
HeadingArcCenter = nil
HeadingArcRange = nil
TurretYaw = 0
TurretYawRange =60

Notice that the firing arc is based only off the available Yaw that the turret is allowed to travel. In this case the arc is 120 degrees across with the turrets total Yaw being +/- 60 degrees. In this situation the turret will only turn to face a target that is within the firing arc, otherwise the unit the turret is attached to will have to reorient itself to align the firing arc with the targets current position.

Below is a firing arc of a generic forward facing turret with HeadingArcCenter & HeadingArcRange definied. (HeadingArcCenter & HeadingArcRange shown in green, red Arrow denotes turret center and assuming that it's facing the front of the attacking unit)

Image
HeadingArcCenter = 0
HeadingArcRange = 180
TurretYaw = 0
TurretYawRange = 60

Just as with the previous example the turrets yaw is 60 degrees, providing a total firing arc of 120 degrees. However the Arc Range is 180 degrees, +/- 30 degrees greater than the turrets ability to rotate. Thus the turret could attempt to "track" towards a target within the Arc Range while not quite being able to fully face the target. In such a situation it's possible for a units weapon to track a target while still being unable to fire.

Our attacking unit could be stuck like this until one of the following takes place:
-The target is reset via a scripted event.
-The target is removed or killed.
-Our unit / target changes position.
-The player manually takes control.

When a combat unit has problems tracking / facing a target this creates more "micro" for the player. Obviously this should be avoided if at all possible by matching the HeadingArcRange to the possible Yaw the weapon is expected to have. The corrected figures for the above diagram should look like this...

HeadingArcCenter = 0
HeadingArcRange = 120
TurretYaw = 0
TurretYawRange = 60

*** Will provide more details as time permits. Beware that advanced firing arcs are a pain to setup and even more difficult to explain ***

Resin
Last edited by Resin_Smoker on 20 Sep 2014, 09:45, edited 16 times in total.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Weapon Firing Arcs Explained

Postby Resin_Smoker » 15 Sep 2014, 06:41

*** Reserved ***
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest