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.SmartFallHelper Class Reference

Clone of High Fall with a wider range of operating conditions. More...

Inheritance diagram for GTA.NaturalMotion.SmartFallHelper:
GTA.NaturalMotion.CustomHelper

Public Member Functions

 SmartFallHelper (Ped ped)
 Creates a new Instance of the SmartFallHelper for sending a SmartFall 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 BodyStiffness [set]
 Stiffness of body. Value feeds through to bodyBalance (synced with defaults), to armsWindmill (14 for this value at default ), legs pedal, head look and roll down stairs directly. More...
 
float Bodydamping [set]
 The damping of the joints. More...
 
float Catchfalltime [set]
 The length of time before the impact that the character transitions to the landing. More...
 
float CrashOrLandCutOff [set]
 0.52angle is 0.868 dot//A threshold for deciding how far away from upright the character needs to be before bailing out (going into a foetal) instead of trying to land (keeping stretched out). NB: never does bailout if ignorWorldCollisions true. More...
 
float PdStrength [set]
 Strength of the controller to keep the character at angle aimAngleBase from vertical. More...
 
float PdDamping [set]
 Damping multiplier of the controller to keep the character at angle aimAngleBase from vertical. The actual damping is pdDamping*pdStrength*constant*angVel. More...
 
float ArmAngSpeed [set]
 Arm circling speed in armWindMillAdaptive. More...
 
float ArmAmplitude [set]
 In armWindMillAdaptive. More...
 
float ArmPhase [set]
 In armWindMillAdaptive 3.1 opposite for stuntman. 1.0 old default. 0.0 in phase. More...
 
bool ArmBendElbows [set]
 In armWindMillAdaptive bend the elbows as a function of armAngle. For stunt man true otherwise false. More...
 
float LegRadius [set]
 Radius of legs on pedal. More...
 
float LegAngSpeed [set]
 In pedal. More...
 
float LegAsymmetry [set]
 0.0 for stunt man. Random offset applied per leg to the angular speed to desynchronize the pedaling - set to 0 to disable, otherwise should be set to less than the angularSpeed value. More...
 
float Arms2LegsPhase [set]
 Phase angle between the arms and legs circling angle. More...
 
Synchroisation Arms2LegsSync [set]
 Syncs the arms angle to what the leg angle is. More...
 
float ArmsUp [set]
 Where to put the arms when preparing to land. Approx 1 = above head, 0 = head height, -1 = down. LT -2.0 use catchFall arms, LT -3.0 use prepare for landing pose if Agent is due to land vertically, feet first. More...
 
bool OrientateBodyToFallDirection [set]
 Toggle to orientate to fall direction. i.e. orientate so that the character faces the horizontal velocity direction. More...
 
bool OrientateTwist [set]
 If false don't worry about the twist angle of the character when orientating the character. If false this allows the twist axis of the character to be free (You can get a nice twisting highFall like the one in dieHard 4 when the car goes into the helicopter). More...
 
float OrientateMax [set]
 DEVEL parameter - suggest you don't edit it. Maximum torque the orientation controller can apply. If 0 then no helper torques will be used. 300 will orientate the character softly for all but extreme angles away from aimAngleBase. If abs (current -aimAngleBase) is getting near 3.0 then this can be reduced to give a softer feel. More...
 
bool AlanRickman [set]
 If true then orientate the character to face the point from where it started falling. High fall like the one in "Die Hard" with Alan Rickman. More...
 
bool FowardRoll [set]
 Try to execute a forward Roll on landing. More...
 
bool UseZeroPose_withFowardRoll [set]
 Blend to a zero pose when forward roll is attempted. More...
 
float AimAngleBase [set]
 Angle from vertical the pdController is driving to (positive = forwards). More...
 
float FowardVelRotation [set]
 Scale to add/subtract from aimAngle based on forward speed (Internal). More...
 
float FootVelCompScale [set]
 Scale to change to amount of vel that is added to the foot ik from the velocity (Internal). More...
 
float SideD [set]
 Sideoffset for the feet during prepareForLanding. +ve = right. More...
 
float FowardOffsetOfLegIK [set]
 Forward offset for the feet during prepareForLanding. More...
 
float LegL [set]
 Leg Length for ik (Internal)//unused. More...
 
float CatchFallCutOff [set]
 0.5angle is 0.878 dot. Cutoff to go to the catchFall (internal) //mmmtodo do like crashOrLandCutOff. More...
 
float LegStrength [set]
 Strength of the legs at landing. More...
 
bool Balance [set]
 If true have enough strength to balance. If false not enough strength in legs to balance (even though bodyBlance called). More...
 
bool IgnorWorldCollisions [set]
 Never go into bailout (foetal). More...
 
bool AdaptiveCircling [set]
 Stunt man type fall. Arm and legs circling direction controlled by angmom and orientation. More...
 
bool Hula [set]
 With stunt man type fall. Hula reaction if can't see floor and not rotating fast. More...
 
float MaxSpeedForRecoverableFall [set]
 Character needs to be moving less than this speed to consider fall as a recoverable one. More...
 
float MinSpeedForBrace [set]
 Character needs to be moving at least this fast horizontally to start bracing for impact if there is an object along its trajectory. More...
 
float LandingNormal [set]
 Ray-cast normal doted with up direction has to be greater than this number to consider object flat enough to land on it. More...
 
float RdsForceMag [set]
 
float RdsTargetLinVeDecayTime [set]
 RDS: Time for the targetlinearVelocity to decay to zero. More...
 
float RdsTargetLinearVelocity [set]
 RDS: Helper torques are applied to match the spin of the character to the max of targetLinearVelocity and COMVelMag. -1 to use initial character velocity. More...
 
bool RdsUseStartingFriction [set]
 Start Catch Fall/RDS state with specified friction. Catch fall will overwrite based on setFallingReaction. More...
 
float RdsStartingFriction [set]
 Catch Fall/RDS starting friction. Catch fall will overwrite based on setFallingReaction. More...
 
float RdsStartingFrictionMin [set]
 Catch Fall/RDS starting friction minimum. Catch fall will overwrite based on setFallingReaction. More...
 
float RdsForceVelThreshold [set]
 Velocity threshold under which RDS force mag will be applied. More...
 
int InitialState [set]
 Force initial state (used in vehicle bail out to start SF_CatchFall (6) earlier. More...
 
bool ChangeExtremityFriction [set]
 Allow friction changes to be applied to the hands and feet. More...
 
bool Teeter [set]
 Set up an immediate teeter in the direction of trave if initial state is SF_Balance. More...
 
float TeeterOffset [set]
 Offset the default Teeter edge in the direction of travel. Will need to be tweaked depending on how close to the real edge AI tends to trigger the behavior. More...
 
float StopRollingTime [set]
 Time in seconds before ped should start actively trying to stop rolling. More...
 
float ReboundScale [set]
 Scale for rebound assistance. 0 = off, 1 = very bouncy, 2 = jbone crazy. More...
 
string ReboundMask [set]
 Part mask to apply rebound assistance. More...
 
bool ForceHeadAvoid [set]
 Force head avoid to be active during Catch Fall even when character is not on the ground. More...
 
float CfZAxisSpinReduction [set]
 Pass-through parameter for Catch Fall spin reduction. Increase to stop more spin. 0..1. More...
 
float SplatWhenStopped [set]
 Transition to splat state when com vel is below value, regardless of character health or fall velocity. Set to zero to disable. More...
 
float BlendHeadWhenStopped [set]
 Blend head to neutral pose com vel approaches zero. Linear between zero and value. Set to zero to disable. More...
 
float SpreadLegs [set]
 Spread legs amount for pedal during fall. 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...
 

Detailed Description

Clone of High Fall with a wider range of operating conditions.

Constructor & Destructor Documentation

◆ SmartFallHelper()

GTA.NaturalMotion.SmartFallHelper.SmartFallHelper ( Ped  ped)

Creates a new Instance of the SmartFallHelper for sending a SmartFall Message to a given Ped.

Parameters
pedThe Ped to send the SmartFall Message to.

Clone of High Fall with a wider range of operating conditions.

Property Documentation

◆ AdaptiveCircling

bool GTA.NaturalMotion.SmartFallHelper.AdaptiveCircling
set

Stunt man type fall. Arm and legs circling direction controlled by angmom and orientation.

Default value = True.

◆ AimAngleBase

float GTA.NaturalMotion.SmartFallHelper.AimAngleBase
set

Angle from vertical the pdController is driving to (positive = forwards).

Default value = 0.2f. Min value = -3.1f. Max value = 3.1f.

◆ AlanRickman

bool GTA.NaturalMotion.SmartFallHelper.AlanRickman
set

If true then orientate the character to face the point from where it started falling. High fall like the one in "Die Hard" with Alan Rickman.

Default value = False.

◆ ArmAmplitude

float GTA.NaturalMotion.SmartFallHelper.ArmAmplitude
set

In armWindMillAdaptive.

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

◆ ArmAngSpeed

float GTA.NaturalMotion.SmartFallHelper.ArmAngSpeed
set

Arm circling speed in armWindMillAdaptive.

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

◆ ArmBendElbows

bool GTA.NaturalMotion.SmartFallHelper.ArmBendElbows
set

In armWindMillAdaptive bend the elbows as a function of armAngle. For stunt man true otherwise false.

Default value = True.

◆ ArmPhase

float GTA.NaturalMotion.SmartFallHelper.ArmPhase
set

In armWindMillAdaptive 3.1 opposite for stuntman. 1.0 old default. 0.0 in phase.

Default value = 3.1f. Min value = 0.0f. Max value = 6.3f.

◆ Arms2LegsPhase

float GTA.NaturalMotion.SmartFallHelper.Arms2LegsPhase
set

Phase angle between the arms and legs circling angle.

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

◆ Arms2LegsSync

Synchroisation GTA.NaturalMotion.SmartFallHelper.Arms2LegsSync
set

Syncs the arms angle to what the leg angle is.

Default value = Synchroisation.AlwaysSynced. All speed/direction parameters of armswindmill are overwritten if = Synchroisation.AlwaysSynced. If Synchroisation.SyncedAtStart and you want synced arms/legs then armAngSpeed=legAngSpeed, legAsymmetry = 0.0 (to stop randomizations of the leg cicle speed).

◆ ArmsUp

float GTA.NaturalMotion.SmartFallHelper.ArmsUp
set

Where to put the arms when preparing to land. Approx 1 = above head, 0 = head height, -1 = down. LT -2.0 use catchFall arms, LT -3.0 use prepare for landing pose if Agent is due to land vertically, feet first.

Default value = -3.1f. Min value = -4.0f. Max value = 2.0f.

◆ Balance

bool GTA.NaturalMotion.SmartFallHelper.Balance
set

If true have enough strength to balance. If false not enough strength in legs to balance (even though bodyBlance called).

Default value = True.

◆ BlendHeadWhenStopped

float GTA.NaturalMotion.SmartFallHelper.BlendHeadWhenStopped
set

Blend head to neutral pose com vel approaches zero. Linear between zero and value. Set to zero to disable.

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

◆ Bodydamping

float GTA.NaturalMotion.SmartFallHelper.Bodydamping
set

The damping of the joints.

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

◆ BodyStiffness

float GTA.NaturalMotion.SmartFallHelper.BodyStiffness
set

Stiffness of body. Value feeds through to bodyBalance (synced with defaults), to armsWindmill (14 for this value at default ), legs pedal, head look and roll down stairs directly.

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

◆ CatchFallCutOff

float GTA.NaturalMotion.SmartFallHelper.CatchFallCutOff
set

0.5angle is 0.878 dot. Cutoff to go to the catchFall (internal) //mmmtodo do like crashOrLandCutOff.

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

◆ Catchfalltime

float GTA.NaturalMotion.SmartFallHelper.Catchfalltime
set

The length of time before the impact that the character transitions to the landing.

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

◆ CfZAxisSpinReduction

float GTA.NaturalMotion.SmartFallHelper.CfZAxisSpinReduction
set

Pass-through parameter for Catch Fall spin reduction. Increase to stop more spin. 0..1.

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

◆ ChangeExtremityFriction

bool GTA.NaturalMotion.SmartFallHelper.ChangeExtremityFriction
set

Allow friction changes to be applied to the hands and feet.

Default value = False.

◆ CrashOrLandCutOff

float GTA.NaturalMotion.SmartFallHelper.CrashOrLandCutOff
set

0.52angle is 0.868 dot//A threshold for deciding how far away from upright the character needs to be before bailing out (going into a foetal) instead of trying to land (keeping stretched out). NB: never does bailout if ignorWorldCollisions true.

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

◆ FootVelCompScale

float GTA.NaturalMotion.SmartFallHelper.FootVelCompScale
set

Scale to change to amount of vel that is added to the foot ik from the velocity (Internal).

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

◆ ForceHeadAvoid

bool GTA.NaturalMotion.SmartFallHelper.ForceHeadAvoid
set

Force head avoid to be active during Catch Fall even when character is not on the ground.

Default value = False.

◆ FowardOffsetOfLegIK

float GTA.NaturalMotion.SmartFallHelper.FowardOffsetOfLegIK
set

Forward offset for the feet during prepareForLanding.

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

◆ FowardRoll

bool GTA.NaturalMotion.SmartFallHelper.FowardRoll
set

Try to execute a forward Roll on landing.

Default value = False.

◆ FowardVelRotation

float GTA.NaturalMotion.SmartFallHelper.FowardVelRotation
set

Scale to add/subtract from aimAngle based on forward speed (Internal).

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

◆ Hula

bool GTA.NaturalMotion.SmartFallHelper.Hula
set

With stunt man type fall. Hula reaction if can't see floor and not rotating fast.

Default value = True.

◆ IgnorWorldCollisions

bool GTA.NaturalMotion.SmartFallHelper.IgnorWorldCollisions
set

Never go into bailout (foetal).

Default value = False.

◆ InitialState

int GTA.NaturalMotion.SmartFallHelper.InitialState
set

Force initial state (used in vehicle bail out to start SF_CatchFall (6) earlier.

Default value = 0. Min value = 0. Max value = 7.

◆ LandingNormal

float GTA.NaturalMotion.SmartFallHelper.LandingNormal
set

Ray-cast normal doted with up direction has to be greater than this number to consider object flat enough to land on it.

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

◆ LegAngSpeed

float GTA.NaturalMotion.SmartFallHelper.LegAngSpeed
set

In pedal.

Default value = 7.9f. Min value = 0.0f. Max value = 15.0f.

◆ LegAsymmetry

float GTA.NaturalMotion.SmartFallHelper.LegAsymmetry
set

0.0 for stunt man. Random offset applied per leg to the angular speed to desynchronize the pedaling - set to 0 to disable, otherwise should be set to less than the angularSpeed value.

Default value = 4.0f. Min value = -10.0f. Max value = 10.0f.

◆ LegL

float GTA.NaturalMotion.SmartFallHelper.LegL
set

Leg Length for ik (Internal)//unused.

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

◆ LegRadius

float GTA.NaturalMotion.SmartFallHelper.LegRadius
set

Radius of legs on pedal.

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

◆ LegStrength

float GTA.NaturalMotion.SmartFallHelper.LegStrength
set

Strength of the legs at landing.

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

◆ MaxSpeedForRecoverableFall

float GTA.NaturalMotion.SmartFallHelper.MaxSpeedForRecoverableFall
set

Character needs to be moving less than this speed to consider fall as a recoverable one.

Default value = 15.0f. Min value = 0.0f. Max value = 100.0f.

◆ MinSpeedForBrace

float GTA.NaturalMotion.SmartFallHelper.MinSpeedForBrace
set

Character needs to be moving at least this fast horizontally to start bracing for impact if there is an object along its trajectory.

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

◆ OrientateBodyToFallDirection

bool GTA.NaturalMotion.SmartFallHelper.OrientateBodyToFallDirection
set

Toggle to orientate to fall direction. i.e. orientate so that the character faces the horizontal velocity direction.

Default value = False.

◆ OrientateMax

float GTA.NaturalMotion.SmartFallHelper.OrientateMax
set

DEVEL parameter - suggest you don't edit it. Maximum torque the orientation controller can apply. If 0 then no helper torques will be used. 300 will orientate the character softly for all but extreme angles away from aimAngleBase. If abs (current -aimAngleBase) is getting near 3.0 then this can be reduced to give a softer feel.

Default value = 300.0f. Min value = 0.0f. Max value = 2000.0f.

◆ OrientateTwist

bool GTA.NaturalMotion.SmartFallHelper.OrientateTwist
set

If false don't worry about the twist angle of the character when orientating the character. If false this allows the twist axis of the character to be free (You can get a nice twisting highFall like the one in dieHard 4 when the car goes into the helicopter).

Default value = True.

◆ PdDamping

float GTA.NaturalMotion.SmartFallHelper.PdDamping
set

Damping multiplier of the controller to keep the character at angle aimAngleBase from vertical. The actual damping is pdDamping*pdStrength*constant*angVel.

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

◆ PdStrength

float GTA.NaturalMotion.SmartFallHelper.PdStrength
set

Strength of the controller to keep the character at angle aimAngleBase from vertical.

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

◆ RdsForceMag

float GTA.NaturalMotion.SmartFallHelper.RdsForceMag
set

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

◆ RdsForceVelThreshold

float GTA.NaturalMotion.SmartFallHelper.RdsForceVelThreshold
set

Velocity threshold under which RDS force mag will be applied.

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

◆ RdsStartingFriction

float GTA.NaturalMotion.SmartFallHelper.RdsStartingFriction
set

Catch Fall/RDS starting friction. Catch fall will overwrite based on setFallingReaction.

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

◆ RdsStartingFrictionMin

float GTA.NaturalMotion.SmartFallHelper.RdsStartingFrictionMin
set

Catch Fall/RDS starting friction minimum. Catch fall will overwrite based on setFallingReaction.

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

◆ RdsTargetLinearVelocity

float GTA.NaturalMotion.SmartFallHelper.RdsTargetLinearVelocity
set

RDS: Helper torques are applied to match the spin of the character to the max of targetLinearVelocity and COMVelMag. -1 to use initial character velocity.

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

◆ RdsTargetLinVeDecayTime

float GTA.NaturalMotion.SmartFallHelper.RdsTargetLinVeDecayTime
set

RDS: Time for the targetlinearVelocity to decay to zero.

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

◆ RdsUseStartingFriction

bool GTA.NaturalMotion.SmartFallHelper.RdsUseStartingFriction
set

Start Catch Fall/RDS state with specified friction. Catch fall will overwrite based on setFallingReaction.

Default value = False.

◆ ReboundMask

string GTA.NaturalMotion.SmartFallHelper.ReboundMask
set

Part mask to apply rebound assistance.

Default value = uk.

◆ ReboundScale

float GTA.NaturalMotion.SmartFallHelper.ReboundScale
set

Scale for rebound assistance. 0 = off, 1 = very bouncy, 2 = jbone crazy.

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

◆ SideD

float GTA.NaturalMotion.SmartFallHelper.SideD
set

Sideoffset for the feet during prepareForLanding. +ve = right.

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

◆ SplatWhenStopped

float GTA.NaturalMotion.SmartFallHelper.SplatWhenStopped
set

Transition to splat state when com vel is below value, regardless of character health or fall velocity. Set to zero to disable.

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

◆ SpreadLegs

float GTA.NaturalMotion.SmartFallHelper.SpreadLegs
set

Spread legs amount for pedal during fall.

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

◆ StopRollingTime

float GTA.NaturalMotion.SmartFallHelper.StopRollingTime
set

Time in seconds before ped should start actively trying to stop rolling.

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

◆ Teeter

bool GTA.NaturalMotion.SmartFallHelper.Teeter
set

Set up an immediate teeter in the direction of trave if initial state is SF_Balance.

Default value = False.

◆ TeeterOffset

float GTA.NaturalMotion.SmartFallHelper.TeeterOffset
set

Offset the default Teeter edge in the direction of travel. Will need to be tweaked depending on how close to the real edge AI tends to trigger the behavior.

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

◆ UseZeroPose_withFowardRoll

bool GTA.NaturalMotion.SmartFallHelper.UseZeroPose_withFowardRoll
set

Blend to a zero pose when forward roll is attempted.

Default value = False.


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