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.BodyBalanceHelper Class Reference
Inheritance diagram for GTA.NaturalMotion.BodyBalanceHelper:
GTA.NaturalMotion.CustomHelper

Public Member Functions

 BodyBalanceHelper (Ped ped)
 Creates a new Instance of the BodyBalanceHelper for sending a BodyBalance 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 ArmStiffness [set]
 NB. WAS m_bodyStiffness ClaviclesStiffness=9.0f. More...
 
float Elbow [set]
 How much the elbow swings based on the leg movement. More...
 
float Shoulder [set]
 How much the shoulder(lean1) swings based on the leg movement. More...
 
float ArmDamping [set]
 NB. WAS m_damping NeckDamping=1 ClaviclesDamping=1. More...
 
bool UseHeadLook [set]
 Enable and provide a look-at target to make the character's head turn to face it while balancing. More...
 
Vector3 HeadLookPos [set]
 Position of thing to look at. More...
 
int HeadLookInstanceIndex [set]
 Level index of thing to look at. More...
 
float SpineStiffness [set]
 
float SomersaultAngle [set]
 Multiplier of the somersault 'angle' (lean forward/back) for arms out (lean2). More...
 
float SomersaultAngleThreshold [set]
 Amount of somersault 'angle' before m_somersaultAngle is used for ArmsOut. Unless drunk - DO NOT EXCEED 0.8. More...
 
float SideSomersaultAngle [set]
 Amount of side somersault 'angle' before sideSomersault is used for ArmsOut. Unless drunk - DO NOT EXCEED 0.8. More...
 
float SideSomersaultAngleThreshold [set]
 
bool BackwardsAutoTurn [set]
 Automatically turn around if moving backwards. More...
 
float TurnWithBumpRadius [set]
 0.9 is a sensible value. If pusher within this distance then turn to get out of the way of the pusher. More...
 
bool BackwardsArms [set]
 Bend elbows, relax shoulders and inhibit spine twist when moving backwards. More...
 
bool BlendToZeroPose [set]
 Blend upper body to zero pose as the character comes to rest. If false blend to a stored pose. More...
 
bool ArmsOutOnPush [set]
 Put arms out based on lean2 of legs, or angular velocity (lean or twist), or lean (front/back or side/side). More...
 
float ArmsOutOnPushMultiplier [set]
 Arms out based on lean2 of the legs to simulate being pushed. More...
 
float ArmsOutOnPushTimeout [set]
 Number of seconds before turning off the armsOutOnPush response only for Arms out based on lean2 of the legs (NOT for the angle or angular velocity). More...
 
float ReturningToBalanceArmsOut [set]
 Range 0:1 0 = don't raise arms if returning to upright position, 0.x = 0.x*raise arms based on angvel and 'angle' settings, 1 = raise arms based on angvel and 'angle' settings. More...
 
float ArmsOutStraightenElbows [set]
 Multiplier for straightening the elbows based on the amount of arms out(lean2) 0 = dont straighten elbows. Otherwise straighten elbows proportionately to armsOut. More...
 
float ArmsOutMinLean2 [set]
 Minimum desiredLean2 applied to shoulder (to stop arms going above shoulder height or not). More...
 
float SpineDamping [set]
 
bool UseBodyTurn [set]
 
float ElbowAngleOnContact [set]
 On contact with upperbody the desired elbow angle is set to at least this value. More...
 
float BendElbowsTime [set]
 Time after contact (with Upper body) that the min m_elbowAngleOnContact is applied. More...
 
float BendElbowsGait [set]
 Minimum desired angle of elbow during non contact arm swing. More...
 
float HipL2ArmL2 [set]
 Mmmmdrunk = 0.2 multiplier of hip lean2 (star jump) to give shoulder lean2 (flapping). More...
 
float ShoulderL2 [set]
 Mmmmdrunk = 0.7 shoulder lean2 offset. More...
 
float ShoulderL1 [set]
 Mmmmdrunk 1.1 shoulder lean1 offset (+ve frankenstein). More...
 
float ShoulderTwist [set]
 Mmmmdrunk = 0.0 shoulder twist. More...
 
float HeadLookAtVelProb [set]
 Probability [0-1] that headLook will be looking in the direction of velocity when stepping. More...
 
float TurnOffProb [set]
 Weighted probability that turn will be off. This is one of six turn type weights. More...
 
float Turn2VelProb [set]
 Weighted probability of turning towards velocity. This is one of six turn type weights. More...
 
float TurnAwayProb [set]
 Weighted probability of turning away from headLook target. This is one of six turn type weights. More...
 
float TurnLeftProb [set]
 Weighted probability of turning left. This is one of six turn type weights. More...
 
float TurnRightProb [set]
 Weighted probability of turning right. This is one of six turn type weights. More...
 
float Turn2TargetProb [set]
 Weighted probability of turning towards headLook target. This is one of six turn type weights. More...
 
Vector3 AngVelMultiplier [set]
 Somersault, twist, sideSomersault) multiplier of the angular velocity for arms out (lean2) (somersault, twist, sideSomersault). More...
 
Vector3 AngVelThreshold [set]
 Somersault, twist, sideSomersault) threshold above which angVel is used for arms out (lean2) Unless drunk - DO NOT EXCEED 7.0 for each component. More...
 
float BraceDistance [set]
 If -ve then do not brace. distance from object at which to raise hands to brace 0.5 good if newBrace=true - otherwise 0.65. More...
 
float TargetPredictionTime [set]
 Time expected to get arms up from idle. More...
 
float ReachAbsorbtionTime [set]
 Larger values and he absorbs the impact more. More...
 
float BraceStiffness [set]
 Stiffness of character. Catch_fall stiffness scales with this too, with its defaults at this values default. More...
 
float MinBraceTime [set]
 Minimum bracing time so the character doesn't look twitchy. More...
 
float TimeToBackwardsBrace [set]
 Time before arm brace kicks in when hit from behind. 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...
 
float BraceOffset [set]
 BraceTarget is global headLookPos plus braceOffset m in the up direction. More...
 
float MoveRadius [set]
 If -ve don't move away from pusher unless moveWhenBracing is true and braceDistance GT 0.0f. if the pusher is closer than moveRadius then move away from it. More...
 
float MoveAmount [set]
 Amount of leanForce applied away from pusher. More...
 
bool MoveWhenBracing [set]
 Only move away from pusher when bracing against pusher. 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

◆ BodyBalanceHelper()

GTA.NaturalMotion.BodyBalanceHelper.BodyBalanceHelper ( Ped  ped)

Creates a new Instance of the BodyBalanceHelper for sending a BodyBalance Message to a given Ped.

Parameters
pedThe Ped to send the BodyBalance Message to.

Property Documentation

◆ AngVelMultiplier

Vector3 GTA.NaturalMotion.BodyBalanceHelper.AngVelMultiplier
set

Somersault, twist, sideSomersault) multiplier of the angular velocity for arms out (lean2) (somersault, twist, sideSomersault).

Default value = Vector3(4.0f, 1.0f, 4.0f). Min value = 0.0f. Max value = 20.0f.

◆ AngVelThreshold

Vector3 GTA.NaturalMotion.BodyBalanceHelper.AngVelThreshold
set

Somersault, twist, sideSomersault) threshold above which angVel is used for arms out (lean2) Unless drunk - DO NOT EXCEED 7.0 for each component.

Default value = Vector3(1.2f, 3.0f, 1.2f). Min value = 0.0f. Max value = 40.0f.

◆ ArmDamping

float GTA.NaturalMotion.BodyBalanceHelper.ArmDamping
set

NB. WAS m_damping NeckDamping=1 ClaviclesDamping=1.

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

◆ ArmsOutMinLean2

float GTA.NaturalMotion.BodyBalanceHelper.ArmsOutMinLean2
set

Minimum desiredLean2 applied to shoulder (to stop arms going above shoulder height or not).

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

◆ ArmsOutOnPush

bool GTA.NaturalMotion.BodyBalanceHelper.ArmsOutOnPush
set

Put arms out based on lean2 of legs, or angular velocity (lean or twist), or lean (front/back or side/side).

Default value = True.

◆ ArmsOutOnPushMultiplier

float GTA.NaturalMotion.BodyBalanceHelper.ArmsOutOnPushMultiplier
set

Arms out based on lean2 of the legs to simulate being pushed.

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

◆ ArmsOutOnPushTimeout

float GTA.NaturalMotion.BodyBalanceHelper.ArmsOutOnPushTimeout
set

Number of seconds before turning off the armsOutOnPush response only for Arms out based on lean2 of the legs (NOT for the angle or angular velocity).

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

◆ ArmsOutStraightenElbows

float GTA.NaturalMotion.BodyBalanceHelper.ArmsOutStraightenElbows
set

Multiplier for straightening the elbows based on the amount of arms out(lean2) 0 = dont straighten elbows. Otherwise straighten elbows proportionately to armsOut.

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

◆ ArmStiffness

float GTA.NaturalMotion.BodyBalanceHelper.ArmStiffness
set

NB. WAS m_bodyStiffness ClaviclesStiffness=9.0f.

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

◆ BackwardsArms

bool GTA.NaturalMotion.BodyBalanceHelper.BackwardsArms
set

Bend elbows, relax shoulders and inhibit spine twist when moving backwards.

Default value = False.

◆ BackwardsAutoTurn

bool GTA.NaturalMotion.BodyBalanceHelper.BackwardsAutoTurn
set

Automatically turn around if moving backwards.

Default value = False.

◆ BendElbowsGait

float GTA.NaturalMotion.BodyBalanceHelper.BendElbowsGait
set

Minimum desired angle of elbow during non contact arm swing.

Default value = 0.7f. Min value = -3.0f. Max value = 3.0f.

◆ BendElbowsTime

float GTA.NaturalMotion.BodyBalanceHelper.BendElbowsTime
set

Time after contact (with Upper body) that the min m_elbowAngleOnContact is applied.

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

◆ BlendToZeroPose

bool GTA.NaturalMotion.BodyBalanceHelper.BlendToZeroPose
set

Blend upper body to zero pose as the character comes to rest. If false blend to a stored pose.

Default value = False.

◆ BraceDistance

float GTA.NaturalMotion.BodyBalanceHelper.BraceDistance
set

If -ve then do not brace. distance from object at which to raise hands to brace 0.5 good if newBrace=true - otherwise 0.65.

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

◆ BraceOffset

float GTA.NaturalMotion.BodyBalanceHelper.BraceOffset
set

BraceTarget is global headLookPos plus braceOffset m in the up direction.

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

◆ BraceStiffness

float GTA.NaturalMotion.BodyBalanceHelper.BraceStiffness
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.

◆ Elbow

float GTA.NaturalMotion.BodyBalanceHelper.Elbow
set

How much the elbow swings based on the leg movement.

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

◆ ElbowAngleOnContact

float GTA.NaturalMotion.BodyBalanceHelper.ElbowAngleOnContact
set

On contact with upperbody the desired elbow angle is set to at least this value.

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

◆ HandsDelayMax

float GTA.NaturalMotion.BodyBalanceHelper.HandsDelayMax
set

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

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

◆ HandsDelayMin

float GTA.NaturalMotion.BodyBalanceHelper.HandsDelayMin
set

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

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

◆ HeadLookAtVelProb

float GTA.NaturalMotion.BodyBalanceHelper.HeadLookAtVelProb
set

Probability [0-1] that headLook will be looking in the direction of velocity when stepping.

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

◆ HeadLookInstanceIndex

int GTA.NaturalMotion.BodyBalanceHelper.HeadLookInstanceIndex
set

Level index of thing to look at.

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

◆ HeadLookPos

Vector3 GTA.NaturalMotion.BodyBalanceHelper.HeadLookPos
set

Position of thing to look at.

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

◆ HipL2ArmL2

float GTA.NaturalMotion.BodyBalanceHelper.HipL2ArmL2
set

Mmmmdrunk = 0.2 multiplier of hip lean2 (star jump) to give shoulder lean2 (flapping).

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

◆ MinBraceTime

float GTA.NaturalMotion.BodyBalanceHelper.MinBraceTime
set

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

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

◆ MoveAmount

float GTA.NaturalMotion.BodyBalanceHelper.MoveAmount
set

Amount of leanForce applied away from pusher.

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

◆ MoveRadius

float GTA.NaturalMotion.BodyBalanceHelper.MoveRadius
set

If -ve don't move away from pusher unless moveWhenBracing is true and braceDistance GT 0.0f. if the pusher is closer than moveRadius then move away from it.

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

◆ MoveWhenBracing

bool GTA.NaturalMotion.BodyBalanceHelper.MoveWhenBracing
set

Only move away from pusher when bracing against pusher.

Default value = False.

◆ ReachAbsorbtionTime

float GTA.NaturalMotion.BodyBalanceHelper.ReachAbsorbtionTime
set

Larger values and he absorbs the impact more.

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

◆ ReturningToBalanceArmsOut

float GTA.NaturalMotion.BodyBalanceHelper.ReturningToBalanceArmsOut
set

Range 0:1 0 = don't raise arms if returning to upright position, 0.x = 0.x*raise arms based on angvel and 'angle' settings, 1 = raise arms based on angvel and 'angle' settings.

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

◆ Shoulder

float GTA.NaturalMotion.BodyBalanceHelper.Shoulder
set

How much the shoulder(lean1) swings based on the leg movement.

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

◆ ShoulderL1

float GTA.NaturalMotion.BodyBalanceHelper.ShoulderL1
set

Mmmmdrunk 1.1 shoulder lean1 offset (+ve frankenstein).

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

◆ ShoulderL2

float GTA.NaturalMotion.BodyBalanceHelper.ShoulderL2
set

Mmmmdrunk = 0.7 shoulder lean2 offset.

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

◆ ShoulderTwist

float GTA.NaturalMotion.BodyBalanceHelper.ShoulderTwist
set

Mmmmdrunk = 0.0 shoulder twist.

Default value = -0.4f. Min value = -3.0f. Max value = 3.0f.

◆ SideSomersaultAngle

float GTA.NaturalMotion.BodyBalanceHelper.SideSomersaultAngle
set

Amount of side somersault 'angle' before sideSomersault is used for ArmsOut. Unless drunk - DO NOT EXCEED 0.8.

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

◆ SideSomersaultAngleThreshold

float GTA.NaturalMotion.BodyBalanceHelper.SideSomersaultAngleThreshold
set

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

◆ SomersaultAngle

float GTA.NaturalMotion.BodyBalanceHelper.SomersaultAngle
set

Multiplier of the somersault 'angle' (lean forward/back) for arms out (lean2).

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

◆ SomersaultAngleThreshold

float GTA.NaturalMotion.BodyBalanceHelper.SomersaultAngleThreshold
set

Amount of somersault 'angle' before m_somersaultAngle is used for ArmsOut. Unless drunk - DO NOT EXCEED 0.8.

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

◆ SpineDamping

float GTA.NaturalMotion.BodyBalanceHelper.SpineDamping
set

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

◆ SpineStiffness

float GTA.NaturalMotion.BodyBalanceHelper.SpineStiffness
set

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

◆ TargetPredictionTime

float GTA.NaturalMotion.BodyBalanceHelper.TargetPredictionTime
set

Time expected to get arms up from idle.

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

◆ TimeToBackwardsBrace

float GTA.NaturalMotion.BodyBalanceHelper.TimeToBackwardsBrace
set

Time before arm brace kicks in when hit from behind.

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

◆ Turn2TargetProb

float GTA.NaturalMotion.BodyBalanceHelper.Turn2TargetProb
set

Weighted probability of turning towards headLook target. This is one of six turn type weights.

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

◆ Turn2VelProb

float GTA.NaturalMotion.BodyBalanceHelper.Turn2VelProb
set

Weighted probability of turning towards velocity. This is one of six turn type weights.

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

◆ TurnAwayProb

float GTA.NaturalMotion.BodyBalanceHelper.TurnAwayProb
set

Weighted probability of turning away from headLook target. This is one of six turn type weights.

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

◆ TurnLeftProb

float GTA.NaturalMotion.BodyBalanceHelper.TurnLeftProb
set

Weighted probability of turning left. This is one of six turn type weights.

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

◆ TurnOffProb

float GTA.NaturalMotion.BodyBalanceHelper.TurnOffProb
set

Weighted probability that turn will be off. This is one of six turn type weights.

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

◆ TurnRightProb

float GTA.NaturalMotion.BodyBalanceHelper.TurnRightProb
set

Weighted probability of turning right. This is one of six turn type weights.

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

◆ TurnWithBumpRadius

float GTA.NaturalMotion.BodyBalanceHelper.TurnWithBumpRadius
set

0.9 is a sensible value. If pusher within this distance then turn to get out of the way of the pusher.

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

◆ UseBodyTurn

bool GTA.NaturalMotion.BodyBalanceHelper.UseBodyTurn
set

Default value = True.

◆ UseHeadLook

bool GTA.NaturalMotion.BodyBalanceHelper.UseHeadLook
set

Enable and provide a look-at target to make the character's head turn to face it while balancing.

Default value = False.


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