Class PointGunHelper
Inherited Members
Namespace: GTA.NaturalMotion
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class PointGunHelper : CustomHelper
Constructors
| Improve this Doc View SourcePointGunHelper(Ped)
Declaration
public PointGunHelper(Ped ped)
Parameters
Type | Name | Description |
---|---|---|
Ped | ped |
Properties
| Improve this Doc View SourceAcrossLimit
Max aiming angle(deg) sideways across body midline measured from chest forward that the character will try to point. i.e. for rightHanded gun this is the angle left of the midline.
Declaration
public float AcrossLimit { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 90.0f. Min value = 0.0f. Max value = 180.0f.
Add2WeaponDistConnect
Add to weaponDistance for point2Connect neutral pointing (to straighten the arm).
Declaration
public float Add2WeaponDistConnect { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = -1.0f. Max value = 1000.0f.
Add2WeaponDistSide
Add to weaponDistance for point2Side neutral pointing (to straighten the arm).
Declaration
public float Add2WeaponDistSide { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.3f. Min value = -1.0f. Max value = 1000.0f.
AllowShotLooseness
Allow shot to set a lower arm muscleStiffness than pointGun normally would.
Declaration
public bool AllowShotLooseness { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
AlwaysSupport
Support a non pointing gunHand i.e. if in zero pose (constrain as well if constraint possible).
Declaration
public bool AlwaysSupport { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
ArmDamping
Damping.
Declaration
public float ArmDamping { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.1f. Max value = 5.0f.
ArmStiffness
Stiffness of the arm.
Declaration
public float ArmStiffness { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 14.0f. Min value = 2.0f. Max value = 15.0f.
ArmStiffnessDetSupport
Stiffness of the arm on pointing arm when a support arm is detached from a two-handed weapon.
Declaration
public float ArmStiffnessDetSupport { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 8.0f. Min value = 2.0f. Max value = 15.0f.
AwayLimit
Max aiming angle(deg) sideways away from body midline measured from chest forward that the character will try to point. i.e. for rightHanded gun this is the angle right of the midline.
Declaration
public float AwayLimit { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 90.0f. Min value = 0.0f. Max value = 180.0f.
BreakingStrength
For supportConstraint = 1: strength of the supporting hands constraint (kg m/s), -1 to ignore/disable.
Declaration
public float BreakingStrength { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -1.0f. Min value = -1.0f. Max value = 1000.0f.
BrokenSupportTime
Once constraint is broken then do not try to reconnect/support for this amount of time.
Declaration
public float BrokenSupportTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 5.0f.
BrokenToSideProb
Probability that the when a constraint is broken that during brokenSupportTime a side pose will be selected.
Declaration
public float BrokenToSideProb { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 1.0f.
CheckNeutralPoint
Check the neutral pointing is pointable, if it isn't then choose a neutral pose instead.
Declaration
public bool CheckNeutralPoint { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
ClavicleBlend
How much of blend should come from incoming transforms 0(all IK) .. 1(all ITMs) For pointing arms only. (Support arm uses the IK solution as is for clavicles).
Declaration
public float ClavicleBlend { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
ConnectAfter
If gunArm has been controlled by other behaviors for this time when it could have been pointing but couldn't due to pointing only allowed if connected, change gunArm pose to something that could connect for connectFor seconds.
Declaration
public float ConnectAfter { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.7f. Min value = 0.0f. Max value = 5.0f.
ConnectFor
Time to try to reconnect for.
Declaration
public float ConnectFor { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.6f. Min value = 0.0f. Max value = 5.0f.
ConstrainRifle
Use hard constraint to keep rifle stock against shoulder?.
Declaration
public bool ConstrainRifle { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
ConstraintMinDistance
For supportConstraint = 1: Support hand constraint distance will be slowly reduced until it hits this value. This is for stability and also allows the pointing arm to lead a little. Don't set lower than NM_MIN_STABLE_DISTANCECONSTRAINT_DISTANCE 0.001f.
Declaration
public float ConstraintMinDistance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 0.1f.
DisableArmCollisions
Disable collisions between right hand/forearm and the torso/legs.
Declaration
public bool DisableArmCollisions { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
DisableRifleCollisions
Disable collisions between right hand/forearm and spine3/spine2 if in rifle mode.
Declaration
public bool DisableRifleCollisions { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
DownLimit
Max aiming angle(deg) downwards from body midline measured from chest forward that the character will try to point.
Declaration
public float DownLimit { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 45.0f. Min value = 0.0f. Max value = 180.0f.
ElbowAttitude
Controls arm twist. (except in pistolIK).
Declaration
public float ElbowAttitude { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.3f. Min value = -1.0f. Max value = 1.0f.
EnableLeft
Allow right hand to point/support?.
Declaration
public bool EnableLeft { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
EnableRight
Allow right hand to point/support?.
Declaration
public bool EnableRight { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
ErrorThreshold
Angular difference between pointing direction and target direction above which feedback will be generated.
Declaration
public float ErrorThreshold { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.4f. Min value = 0.0f. Max value = 3.1f.
FallingLimits
0= don't apply limits. 1=apply the limits below only when the character is falling. 2 = always apply these limits (instead of applying maxAngleAcross and maxAngleAway which only limits the horizontal angle but implicity limits the updown (the limit shape is a vertical hinge).
Declaration
public int FallingLimits { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 0. Min value = 0. Max value = 2.
FallingSupport
Allow supporting of a rifle(or two handed pistol) when falling. 0 = false, 1 = support if allowed, 2 = support until constraint not active (don't allow support to restart), 3 = support until constraint not effective (support hand to support distance must be less than 0.15 - don't allow support to restart).
Declaration
public int FallingSupport { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 1. Min value = 0. Max value = 3.
FallingTypeSupport
What is considered a fall by fallingSupport). Apply fallingSupport 0=never(will support if allowed), 1 = falling, 2 = falling except if falling backwards, 3 = falling and collided, 4 = falling and collided except if falling backwards, 5 = falling except if falling backwards until collided.
Declaration
public int FallingTypeSupport { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 0. Min value = 0. Max value = 5.
FireWeaponRelaxAmount
Relax multiplier following firing weapon. Recovers over relaxTime.
Declaration
public float FireWeaponRelaxAmount { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.1f. Max value = 1.0f.
FireWeaponRelaxDistance
Range of motion for ik-based recoil.
Declaration
public float FireWeaponRelaxDistance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 0.3f.
FireWeaponRelaxTime
Duration of arms relax following firing weapon. NB:This is clamped (0,5) in pointGun.
Declaration
public float FireWeaponRelaxTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.4f. Min value = 0.0f. Max value = 5.0f.
GravityOpposition
Amount of gravity opposition on pointing arm.
Declaration
public float GravityOpposition { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 2.0f.
GravOppDetachedSupport
Amount of gravity opposition on pointing arm when a support arm is detached from a two-handed weapon.
Declaration
public float GravOppDetachedSupport { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 2.0f.
LeadTarget
NB: Only Applied to single handed weapons (some more work is required to have this tech on two handed weapons). Amount to lead target based on target velocity relative to the chest.
Declaration
public float LeadTarget { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 10.0f.
LeftHandParentEffector
1 = Use leftShoulder. Effector from which the left hand pointing originates. Ie, point from this part to the target. -1 causes default offset for active weapon mode to be applied.
Declaration
public int LeftHandParentEffector { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = -1. Min value = -1. Max value = 21.
LeftHandParentOffset
Pointing-from offset from parent effector, expressed in spine3's frame, x = back/forward, y = right/left, z = up/down.
Declaration
public Vector3 LeftHandParentOffset { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(0.0f, 0.0f, 0.0f).
LeftHandTarget
Target for the left Hand.
Declaration
public Vector3 LeftHandTarget { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(0.0f, 0.0f, 0.0f).
LeftHandTargetIndex
Index of the object that the left hand target is specified in, -1 is world space.
Declaration
public int LeftHandTargetIndex { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = -1.
MakeConstraintDistance
For supportConstraint = 1: Minimum distance within which support hand constraint will be made.
Declaration
public float MakeConstraintDistance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 3.0f.
MassMultDetachedSupport
Amount of mass of weapon taken into account by gravity opposition on pointing arm when a support arm is detached from a two-handed weapon. The lower the value the more the character doesn't know about the weapon mass and therefore is more affected by it.
Declaration
public float MassMultDetachedSupport { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 1.0f.
MaxAngleAcross
Max aiming angle(deg) sideways across body midline measured from chest forward that the character will try to point.
Declaration
public float MaxAngleAcross { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 90.0f. Min value = 0.0f. Max value = 180.0f.
MaxAngleAway
Max aiming angle(deg) sideways away from body midline measured from chest forward that the character will try to point.
Declaration
public float MaxAngleAway { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 90.0f. Min value = 0.0f. Max value = 180.0f.
MeasureParentOffset
If useIncomingTransforms = true and measureParentOffset=true then measure the Pointing-from offset from parent effector, using itms - this should point the barrel of the gun to the target. This is added to the rightHandParentOffset. NB NOT used if rightHandParentEffector LT 0.
Declaration
public bool MeasureParentOffset { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
NeutralPoint4Pistols
NOT IMPLEMENTED YET KEEP=false - use pointing for neutral targets in pistol modes.
Declaration
public bool NeutralPoint4Pistols { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
NeutralPoint4Rifle
Use pointing for neutral targets in rifle mode.
Declaration
public bool NeutralPoint4Rifle { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
OneHandedPointing
0 = don't allow, 1= allow for kPistol(two handed pistol) only, 2 = allow for kRifle only, 3 = allow for kPistol and kRifle. Allow one handed pointing - no constraint if cant be supported . If not allowed then gunHand does not try to point at target if it cannot be supported - the constraint will be controlled by always support.
Declaration
public int OneHandedPointing { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 1. Min value = 0. Max value = 3.
PistolNeutralType
0 = byFace, 1=acrossFront, 2=bySide. NB: bySide is not connectible so be careful if combined with kPistol and oneHandedPointing = 0 or 2.
Declaration
public int PistolNeutralType { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 0. Min value = 0. Max value = 2.
Point2Connect
Side, up, back) side is left for left arm, right for rght arm mmmmtodo.
Declaration
public Vector3 Point2Connect { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(-1.0f, -0.9f, -0.2f).
Point2Side
Side, up, back) side is left for left arm, right for right arm mmmmtodo.
Declaration
public Vector3 Point2Side { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(5.0f, -5.0f, -2.0f).
PoseUnusedGunArm
Apply neutral pose when a gun arm isn't in use. NB: at the moment Rifle hand is always controlled by pointGun.
Declaration
public bool PoseUnusedGunArm { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
PoseUnusedOtherArm
Apply neutral pose to the non-gun arm (otherwise it is always under the control of other behaviors or not set). If the non-gun hand is a supporting hand it is not controlled by this parameter but by poseUnusedSupportArm.
Declaration
public bool PoseUnusedOtherArm { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
PoseUnusedSupportArm
Apply neutral pose when a support arm isn't in use.
Declaration
public bool PoseUnusedSupportArm { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
PrimaryHandWeaponDistance
Distance from the shoulder to hold the weapon. If -1 and useIncomingTransforms then weaponDistance is read from ITMs. WeaponDistance=primaryHandWeaponDistance clamped [0.2f:m_maxArmReach=0.65] if useIncomingTransforms = false. pistol 0.60383, rifle 0.336.
Declaration
public float PrimaryHandWeaponDistance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -1.0f. Min value = -1.0f. Max value = 1.0f.
ReduceConstraintLengthVel
For supportConstraint = 1: Velocity at which to reduce the support hand constraint length.
Declaration
public float ReduceConstraintLengthVel { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.5f. Min value = 0.1f. Max value = 10.0f.
RifleConstraintMinDistance
Rifle constraint distance. Deliberately kept large to create a flat constraint surface where rifle meets the shoulder.
Declaration
public float RifleConstraintMinDistance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.2f. Min value = 0.0f.
RifleFall
Pose the rifle hand to reduce complications with collisions. 0 = false, 1 = always when falling, 2 = when falling except if falling backwards.
Declaration
public int RifleFall { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 0. Min value = 0. Max value = 2.
RightHandParentEffector
1 = Use rightShoulder.. Effector from which the right hand pointing originates. Ie, point from this part to the target. -1 causes default offset for active weapon mode to be applied.
Declaration
public int RightHandParentEffector { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = -1. Min value = -1. Max value = 21.
RightHandParentOffset
Pointing-from offset from parent effector, expressed in spine3's frame, x = back/forward, y = right/left, z = up/down. This is added to the measured one if useIncomingTransforms=true and measureParentOffset=true. NB NOT used if rightHandParentEffector LT 0. Pistol(0,0,0) Rifle(0.0032, 0.0, -0.0).
Declaration
public Vector3 RightHandParentOffset { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(0.0f, 0.0f, 0.0f).
RightHandTarget
Target for the right Hand.
Declaration
public Vector3 RightHandTarget { set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Default value = Vector3(0.0f, 0.0f, 0.0f).
RightHandTargetIndex
Index of the object that the right hand target is specified in, -1 is world space.
Declaration
public int RightHandTargetIndex { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = -1.
SupportConstraint
Type of constraint between the support hand and gun. 0=no constraint, 1=hard distance constraint, 2=Force based constraint, 3=hard spherical constraint.
Declaration
public int SupportConstraint { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 1. Min value = 0. Max value = 3.
UpLimit
Max aiming angle(deg) upwards from body midline measured from chest forward that the character will try to point.
Declaration
public float UpLimit { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 90.0f. Min value = 0.0f. Max value = 180.0f.
UseHeadLook
Use head look to drive head?.
Declaration
public bool UseHeadLook { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
UseIncomingTransforms
Use the incoming transforms to inform the pointGun of the primaryWeaponDistance, poleVector for the arm.
Declaration
public bool UseIncomingTransforms { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
UsePistolIK
Enable new ik for pistol pointing.
Declaration
public bool UsePistolIK { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
UseSpineTwist
Use spine twist to orient chest?.
Declaration
public bool UseSpineTwist { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
UseTurnToTarget
Turn balancer to help gun point at target.
Declaration
public bool UseTurnToTarget { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.