SHVDN  v3
An ASI plugin for Grand Theft Auto V, which allows running scripts written in any .NET language in-game. Developed by crosire https://github.com/crosire/scripthookvdotnet/
GTA.NaturalMotion.BraceForImpactHelper Class Reference
Inheritance diagram for GTA.NaturalMotion.BraceForImpactHelper:
GTA.NaturalMotion.CustomHelper

Public Member Functions

 BraceForImpactHelper (Ped ped)
 Creates a new Instance of the BraceForImpactHelper for sending a BraceForImpact Message to a given Ped. More...
 
- Public Member Functions inherited from GTA.NaturalMotion.CustomHelper
void Start ()
 Starts this Natural Motion behavior on the Ped that will loop until manually aborted. More...
 
void Start (int duration)
 Starts this Natural Motion behavior on the Ped for a specified duration. More...
 
void Stop ()
 Stops this Natural Motion behavior on the Ped. More...
 
void SetArgument (string argName, bool value)
 Sets a Message argument to a bool value. More...
 
void SetArgument (string argName, int value)
 Sets a Message argument to a int value. More...
 
void SetArgument (string argName, float value)
 Sets a Message argument to a float value. More...
 
void SetArgument (string argName, string value)
 Sets a Message argument to a string value. More...
 
void SetArgument (string argName, Vector3 value)
 Sets a Message argument to a Vector3 value. More...
 
void ResetArguments ()
 Resets all arguments to their default values. More...
 
override string ToString ()
 Returns the internal message name. More...
 

Properties

float BraceDistance [set]
 Distance from object at which to raise hands to brace 0.5 good if newBrace=true - otherwise 0.65. More...
 
float TargetPredictionTime [set]
 Time epected to get arms up from idle. More...
 
float ReachAbsorbtionTime [set]
 Larger values and he absorbs the impact more. More...
 
int InstanceIndex [set]
 LevelIndex of object to brace. More...
 
float BodyStiffness [set]
 Stiffness of character. Catch_fall stiffness scales with this too, with its defaults at this values default. More...
 
bool GrabDontLetGo [set]
 Once a constraint is made, keep reaching with whatever hand is allowed. More...
 
float GrabStrength [set]
 Strength in hands for grabbing (kg m/s), -1 to ignore/disable. More...
 
float GrabDistance [set]
 Relative distance at which the grab starts. More...
 
float GrabReachAngle [set]
 Angle from front at which the grab activates. If the point is outside this angle from front will not try to grab. More...
 
float GrabHoldTimer [set]
 Amount of time, in seconds, before grab automatically bails. More...
 
float MaxGrabCarVelocity [set]
 Don't try to grab a car moving above this speed mmmmtodo make this the relative velocity of car to character?. More...
 
float LegStiffness [set]
 Balancer leg stiffness mmmmtodo remove this parameter and use configureBalance?. More...
 
float TimeToBackwardsBrace [set]
 Time before arm brace kicks in when hit from behind. More...
 
Vector3 Look [set]
 Position to look at, e.g. the driver. More...
 
Vector3 Pos [set]
 Location of the front part of the object to brace against. This should be the center of where his hands should meet the object. More...
 
float MinBraceTime [set]
 Minimum bracing time so the character doesn't look twitchy. More...
 
float HandsDelayMin [set]
 If bracing with 2 hands delay one hand by at least this amount of time to introduce some asymmetry. More...
 
float HandsDelayMax [set]
 If bracing with 2 hands delay one hand by at most this amount of time to introduce some asymmetry. More...
 
bool MoveAway [set]
 Move away from the car (if in reaching zone). More...
 
float MoveAwayAmount [set]
 ForceLean away amount (-ve is lean towards). More...
 
float MoveAwayLean [set]
 Lean away amount (-ve is lean towards). More...
 
float MoveSideways [set]
 Amount of sideways movement if at the front or back of the car to add to the move away from car. More...
 
bool BbArms [set]
 Use bodyBalance arms for the default (non bracing) behavior if bodyBalance is active. More...
 
bool NewBrace [set]
 Use the new brace prediction code. More...
 
bool BraceOnImpact [set]
 If true then if a shin or thigh is in contact with the car then brace. NB: newBrace must be true. For those situations where the car has pushed the ped backwards (at the same speed as the car) before the behavior has been started and so doesn't predict an impact. More...
 
bool Roll2Velocity [set]
 When rollDownStairs is running use roll2Velocity to control the helper torques (this only attempts to roll to the chaarcter's velocity not some default linear velocity mag. More...
 
int RollType [set]
 0 = original/roll off/stay on car: Roll with character velocity, 1 = //Gentle: roll off/stay on car = use relative velocity of character to car to roll against, 2 = //roll over car: Roll against character velocity. i.e. roll against any velocity picked up by hitting car, 3 = //Gentle: roll over car: use relative velocity of character to car to roll with. More...
 
bool SnapImpacts [set]
 Exaggerate impacts using snap. More...
 
float SnapImpact [set]
 Exaggeration amount of the initial impact (legs). +ve fold with car impact (as if pushed at hips in the car velocity direction). -ve fold away from car impact. More...
 
float SnapBonnet [set]
 Exaggeration amount of the secondary (torso) impact with bonnet. +ve fold with car impact (as if pushed at hips by the impact normal). -ve fold away from car impact. More...
 
float SnapFloor [set]
 Exaggeration amount of the impact with the floor after falling off of car +ve fold with floor impact (as if pushed at hips in the impact normal direction). -ve fold away from car impact. More...
 
bool DampVel [set]
 Damp out excessive spin and upward velocity when on car. More...
 
float DampSpin [set]
 Amount to damp spinning by (cartwheeling and somersaulting). More...
 
float DampUpVel [set]
 Amount to damp upward velocity by to limit the amount of air above the car the character can get. More...
 
float DampSpinThresh [set]
 Angular velocity above which we start damping. More...
 
float DampUpVelThresh [set]
 Upward velocity above which we start damping. More...
 
bool GsHelp [set]
 Enhance a glancing spin with the side of the car by modulating body friction. More...
 
float GsEndMin [set]
 ID for glancing spin. Min depth to be considered from either end (front/rear) of a car (-ve is inside the car area). More...
 
float GsSideMin [set]
 ID for glancing spin. Min depth to be considered on the side of a car (-ve is inside the car area). More...
 
float GsSideMax [set]
 ID for glancing spin. Max depth to be considered on the side of a car (+ve is outside the car area). More...
 
float GsUpness [set]
 ID for glancing spin. Character has to be more upright than this value for it to be considered on the side of a car. Fully upright = 1, upsideDown = -1. Max Angle from upright is acos(gsUpness). More...
 
float GsCarVelMin [set]
 ID for glancing spin. Minimum car velocity. More...
 
bool GsScale1Foot [set]
 Apply gsFricScale1 to the foot if colliding with car. (Otherwise foot friction - with the ground - is determined by gsFricScale2 if it is in gsFricMask2). More...
 
float GsFricScale1 [set]
 Glancing spin help. Friction scale applied when to the side of the car. e.g. make the character spin more by upping the friction against the car. More...
 
string GsFricMask1 [set]
 Glancing spin help. Two character body-masking value, bitwise joint mask or bitwise logic string of two character body-masking value (see notes for explanation). Note gsFricMask1 and gsFricMask2 are made independent by the code so you can have fb for gsFricMask1 but gsFricScale1 will not be applied to any body parts in gsFricMask2. More...
 
float GsFricScale2 [set]
 Glancing spin help. Friction scale applied when to the side of the car. e.g. make the character spin more by lowering the feet friction. You could also lower the wrist friction here to stop the car pulling along the hands i.e. gsFricMask2 = la|uw. More...
 
string GsFricMask2 [set]
 Two character body-masking value, bitwise joint mask or bitwise logic string of two character body-masking value (see notes for explanation). Note gsFricMask1 and gsFricMask2 are made independent by the code so you can have fb for gsFricMask1 but gsFricScale1 will not be applied to any body parts in gsFricMask2. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GTA.NaturalMotion.CustomHelper
 CustomHelper (Ped target, string message)
 Creates a helper class for building Natural Motion messages to send to a given Ped. More...
 

Constructor & Destructor Documentation

◆ BraceForImpactHelper()

GTA.NaturalMotion.BraceForImpactHelper.BraceForImpactHelper ( Ped  ped)

Creates a new Instance of the BraceForImpactHelper for sending a BraceForImpact Message to a given Ped.

Parameters
pedThe Ped to send the BraceForImpact Message to.

Property Documentation

◆ BbArms

bool GTA.NaturalMotion.BraceForImpactHelper.BbArms
set

Use bodyBalance arms for the default (non bracing) behavior if bodyBalance is active.

Default value = False.

◆ BodyStiffness

float GTA.NaturalMotion.BraceForImpactHelper.BodyStiffness
set

Stiffness of character. Catch_fall stiffness scales with this too, with its defaults at this values default.

Default value = 12.0f. Min value = 6.0f. Max value = 16.0f.

◆ BraceDistance

float GTA.NaturalMotion.BraceForImpactHelper.BraceDistance
set

Distance from object at which to raise hands to brace 0.5 good if newBrace=true - otherwise 0.65.

Default value = 0.5f. Min value = 0.0f. Max value = 1.0f.

◆ BraceOnImpact

bool GTA.NaturalMotion.BraceForImpactHelper.BraceOnImpact
set

If true then if a shin or thigh is in contact with the car then brace. NB: newBrace must be true. For those situations where the car has pushed the ped backwards (at the same speed as the car) before the behavior has been started and so doesn't predict an impact.

Default value = False.

◆ DampSpin

float GTA.NaturalMotion.BraceForImpactHelper.DampSpin
set

Amount to damp spinning by (cartwheeling and somersaulting).

Default value = 0.0f. Min value = 0.0f. Max value = 40.0f.

◆ DampSpinThresh

float GTA.NaturalMotion.BraceForImpactHelper.DampSpinThresh
set

Angular velocity above which we start damping.

Default value = 4.0f. Min value = 0.0f. Max value = 20.0f.

◆ DampUpVel

float GTA.NaturalMotion.BraceForImpactHelper.DampUpVel
set

Amount to damp upward velocity by to limit the amount of air above the car the character can get.

Default value = 10.0f. Min value = 0.0f. Max value = 40.0f.

◆ DampUpVelThresh

float GTA.NaturalMotion.BraceForImpactHelper.DampUpVelThresh
set

Upward velocity above which we start damping.

Default value = 2.0f. Min value = 0.0f. Max value = 20.0f.

◆ DampVel

bool GTA.NaturalMotion.BraceForImpactHelper.DampVel
set

Damp out excessive spin and upward velocity when on car.

Default value = False.

◆ GrabDistance

float GTA.NaturalMotion.BraceForImpactHelper.GrabDistance
set

Relative distance at which the grab starts.

Default value = 2.0f. Min value = 0.0f. Max value = 4.0f.

◆ GrabDontLetGo

bool GTA.NaturalMotion.BraceForImpactHelper.GrabDontLetGo
set

Once a constraint is made, keep reaching with whatever hand is allowed.

Default value = False.

◆ GrabHoldTimer

float GTA.NaturalMotion.BraceForImpactHelper.GrabHoldTimer
set

Amount of time, in seconds, before grab automatically bails.

Default value = 2.5f. Min value = 0.0f. Max value = 10.0f.

◆ GrabReachAngle

float GTA.NaturalMotion.BraceForImpactHelper.GrabReachAngle
set

Angle from front at which the grab activates. If the point is outside this angle from front will not try to grab.

Default value = 1.5f. Min value = 0.0f. Max value = 3.2f.

◆ GrabStrength

float GTA.NaturalMotion.BraceForImpactHelper.GrabStrength
set

Strength in hands for grabbing (kg m/s), -1 to ignore/disable.

Default value = 40.0f. Min value = -1.0f. Max value = 1000.0f.

◆ GsCarVelMin

float GTA.NaturalMotion.BraceForImpactHelper.GsCarVelMin
set

ID for glancing spin. Minimum car velocity.

Default value = 3.0f. Min value = 0.0f. Max value = 10.0f.

◆ GsEndMin

float GTA.NaturalMotion.BraceForImpactHelper.GsEndMin
set

ID for glancing spin. Min depth to be considered from either end (front/rear) of a car (-ve is inside the car area).

Default value = -0.1f. Min value = -10.0f. Max value = 1.0f.

◆ GsFricMask1

string GTA.NaturalMotion.BraceForImpactHelper.GsFricMask1
set

Glancing spin help. Two character body-masking value, bitwise joint mask or bitwise logic string of two character body-masking value (see notes for explanation). Note gsFricMask1 and gsFricMask2 are made independent by the code so you can have fb for gsFricMask1 but gsFricScale1 will not be applied to any body parts in gsFricMask2.

Default value = "fb".

◆ GsFricMask2

string GTA.NaturalMotion.BraceForImpactHelper.GsFricMask2
set

Two character body-masking value, bitwise joint mask or bitwise logic string of two character body-masking value (see notes for explanation). Note gsFricMask1 and gsFricMask2 are made independent by the code so you can have fb for gsFricMask1 but gsFricScale1 will not be applied to any body parts in gsFricMask2.

Default value = la.

◆ GsFricScale1

float GTA.NaturalMotion.BraceForImpactHelper.GsFricScale1
set

Glancing spin help. Friction scale applied when to the side of the car. e.g. make the character spin more by upping the friction against the car.

Default value = 8.0f. Min value = 0.0f. Max value = 10.0f.

◆ GsFricScale2

float GTA.NaturalMotion.BraceForImpactHelper.GsFricScale2
set

Glancing spin help. Friction scale applied when to the side of the car. e.g. make the character spin more by lowering the feet friction. You could also lower the wrist friction here to stop the car pulling along the hands i.e. gsFricMask2 = la|uw.

Default value = 0.2f. Min value = 0.0f. Max value = 10.0f.

◆ GsHelp

bool GTA.NaturalMotion.BraceForImpactHelper.GsHelp
set

Enhance a glancing spin with the side of the car by modulating body friction.

Default value = False.

◆ GsScale1Foot

bool GTA.NaturalMotion.BraceForImpactHelper.GsScale1Foot
set

Apply gsFricScale1 to the foot if colliding with car. (Otherwise foot friction - with the ground - is determined by gsFricScale2 if it is in gsFricMask2).

Default value = True.

◆ GsSideMax

float GTA.NaturalMotion.BraceForImpactHelper.GsSideMax
set

ID for glancing spin. Max depth to be considered on the side of a car (+ve is outside the car area).

Default value = 0.5f. Min value = -10.0f. Max value = 1.0f.

◆ GsSideMin

float GTA.NaturalMotion.BraceForImpactHelper.GsSideMin
set

ID for glancing spin. Min depth to be considered on the side of a car (-ve is inside the car area).

Default value = -0.2f. Min value = -10.0f. Max value = 1.0f.

◆ GsUpness

float GTA.NaturalMotion.BraceForImpactHelper.GsUpness
set

ID for glancing spin. Character has to be more upright than this value for it to be considered on the side of a car. Fully upright = 1, upsideDown = -1. Max Angle from upright is acos(gsUpness).

Default value = 0.9f. Min value = 0.0f. Max value = 10.0f.

◆ HandsDelayMax

float GTA.NaturalMotion.BraceForImpactHelper.HandsDelayMax
set

If bracing with 2 hands delay one hand by at most this amount of time to introduce some asymmetry.

Default value = 0.3f. Min value = 0.0f. Max value = 3.0f.

◆ HandsDelayMin

float GTA.NaturalMotion.BraceForImpactHelper.HandsDelayMin
set

If bracing with 2 hands delay one hand by at least this amount of time to introduce some asymmetry.

Default value = 0.1f. Min value = 0.0f. Max value = 3.0f.

◆ InstanceIndex

int GTA.NaturalMotion.BraceForImpactHelper.InstanceIndex
set

LevelIndex of object to brace.

Default value = -1. Min value = -1.

◆ LegStiffness

float GTA.NaturalMotion.BraceForImpactHelper.LegStiffness
set

Balancer leg stiffness mmmmtodo remove this parameter and use configureBalance?.

Default value = 12.0f. Min value = 6.0f. Max value = 16.0f.

◆ Look

Vector3 GTA.NaturalMotion.BraceForImpactHelper.Look
set

Position to look at, e.g. the driver.

Default value = Vector3(0.0f, 0.0f, 0.0f).

◆ MaxGrabCarVelocity

float GTA.NaturalMotion.BraceForImpactHelper.MaxGrabCarVelocity
set

Don't try to grab a car moving above this speed mmmmtodo make this the relative velocity of car to character?.

Default value = 95.0f. Min value = 0.0f. Max value = 1000.0f.

◆ MinBraceTime

float GTA.NaturalMotion.BraceForImpactHelper.MinBraceTime
set

Minimum bracing time so the character doesn't look twitchy.

Default value = 0.3f. Min value = 0.0f. Max value = 3.0f.

◆ MoveAway

bool GTA.NaturalMotion.BraceForImpactHelper.MoveAway
set

Move away from the car (if in reaching zone).

Default value = False.

◆ MoveAwayAmount

float GTA.NaturalMotion.BraceForImpactHelper.MoveAwayAmount
set

ForceLean away amount (-ve is lean towards).

Default value = 0.1f. Min value = -1.0f. Max value = 1.0f.

◆ MoveAwayLean

float GTA.NaturalMotion.BraceForImpactHelper.MoveAwayLean
set

Lean away amount (-ve is lean towards).

Default value = 0.1f. Min value = -0.5f. Max value = 0.5f.

◆ MoveSideways

float GTA.NaturalMotion.BraceForImpactHelper.MoveSideways
set

Amount of sideways movement if at the front or back of the car to add to the move away from car.

Default value = 0.3f. Min value = 0.0f. Max value = 10.0f.

◆ NewBrace

bool GTA.NaturalMotion.BraceForImpactHelper.NewBrace
set

Use the new brace prediction code.

Default value = True.

◆ Pos

Vector3 GTA.NaturalMotion.BraceForImpactHelper.Pos
set

Location of the front part of the object to brace against. This should be the center of where his hands should meet the object.

Default value = Vector3(0.0f, 0.0f, 0.0f).

◆ ReachAbsorbtionTime

float GTA.NaturalMotion.BraceForImpactHelper.ReachAbsorbtionTime
set

Larger values and he absorbs the impact more.

Default value = 0.2f. Min value = 0.0f. Max value = 1.0f.

◆ Roll2Velocity

bool GTA.NaturalMotion.BraceForImpactHelper.Roll2Velocity
set

When rollDownStairs is running use roll2Velocity to control the helper torques (this only attempts to roll to the chaarcter's velocity not some default linear velocity mag.

Default value = False.

◆ RollType

int GTA.NaturalMotion.BraceForImpactHelper.RollType
set

0 = original/roll off/stay on car: Roll with character velocity, 1 = //Gentle: roll off/stay on car = use relative velocity of character to car to roll against, 2 = //roll over car: Roll against character velocity. i.e. roll against any velocity picked up by hitting car, 3 = //Gentle: roll over car: use relative velocity of character to car to roll with.

Default value = 3. Min value = 0. Max value = 3.

◆ SnapBonnet

float GTA.NaturalMotion.BraceForImpactHelper.SnapBonnet
set

Exaggeration amount of the secondary (torso) impact with bonnet. +ve fold with car impact (as if pushed at hips by the impact normal). -ve fold away from car impact.

Default value = -7.0f. Min value = -20.0f. Max value = 20.0f.

◆ SnapFloor

float GTA.NaturalMotion.BraceForImpactHelper.SnapFloor
set

Exaggeration amount of the impact with the floor after falling off of car +ve fold with floor impact (as if pushed at hips in the impact normal direction). -ve fold away from car impact.

Default value = 7.0f. Min value = -20.0f. Max value = 20.0f.

◆ SnapImpact

float GTA.NaturalMotion.BraceForImpactHelper.SnapImpact
set

Exaggeration amount of the initial impact (legs). +ve fold with car impact (as if pushed at hips in the car velocity direction). -ve fold away from car impact.

Default value = 7.0f. Min value = -20.0f. Max value = 20.0f.

◆ SnapImpacts

bool GTA.NaturalMotion.BraceForImpactHelper.SnapImpacts
set

Exaggerate impacts using snap.

Default value = False.

◆ TargetPredictionTime

float GTA.NaturalMotion.BraceForImpactHelper.TargetPredictionTime
set

Time epected to get arms up from idle.

Default value = 0.5f. Min value = 0.0f. Max value = 1.0f.

◆ TimeToBackwardsBrace

float GTA.NaturalMotion.BraceForImpactHelper.TimeToBackwardsBrace
set

Time before arm brace kicks in when hit from behind.

Default value = 1.0f. Min value = 0.0f. Max value = 10.0f.


The documentation for this class was generated from the following file: