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

Public Member Functions

 GrabHelper (Ped ped)
 Creates a new Instance of the GrabHelper for sending a Grab 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

bool UseLeft [set]
 Flag to toggle use of left hand. More...
 
bool UseRight [set]
 Flag to toggle the use of the Right hand. More...
 
bool DropWeaponIfNecessary [set]
 If hasn't grabbed when weapon carrying hand is close to target, grab anyway. More...
 
float DropWeaponDistance [set]
 Distance below which a weapon carrying hand will request weapon to be dropped. More...
 
float GrabStrength [set]
 Strength in hands for grabbing (kg m/s), -1 to ignore/disable. More...
 
float StickyHands [set]
 Strength of cheat force on hands to pull towards target and stick to target ("cleverHandIK" strength). More...
 
TurnType TurnToTarget [set]
 
float GrabHoldMaxTimer [set]
 Amount of time, in seconds, before grab automatically bails. More...
 
float PullUpTime [set]
 Time to reach the full pullup strength. More...
 
float PullUpStrengthRight [set]
 Strength to pull up with the right arm. 0 = no pull up. More...
 
float PullUpStrengthLeft [set]
 Strength to pull up with the left arm. 0 = no pull up. More...
 
Vector3 Pos1 [set]
 Grab pos1, right hand if not using line or surface grab. More...
 
Vector3 Pos2 [set]
 Grab pos2, left hand if not using line or surface grab. More...
 
Vector3 Pos3 [set]
 
Vector3 Pos4 [set]
 
Vector3 NormalR [set]
 Normal for the right grab point. More...
 
Vector3 NormalL [set]
 Normal for the left grab point. More...
 
Vector3 NormalR2 [set]
 Normal for the 2nd right grab point (if pointsX4grab=true). More...
 
Vector3 NormalL2 [set]
 Normal for the 3rd left grab point (if pointsX4grab=true). More...
 
bool HandsCollide [set]
 Hand collisions on when grabbing (false turns off hand collisions making grab more stable esp. To grab points slightly inside geometry). More...
 
bool JustBrace [set]
 Flag to toggle between grabbing and bracing. More...
 
bool UseLineGrab [set]
 Use the line grab, Grab along the line (x-x2). More...
 
bool PointsX4grab [set]
 Use 2 point. More...
 
bool FromEA [set]
 Use 2 point. More...
 
bool SurfaceGrab [set]
 Toggle surface grab on. Requires pos1,pos2,pos3 and pos4 to be specified. More...
 
int InstanceIndex [set]
 LevelIndex of instance to grab (-1 = world coordinates). More...
 
int InstancePartIndex [set]
 BoundIndex of part on instance to grab (0 = just use instance coordinates). More...
 
bool DontLetGo [set]
 Once a constraint is made, keep reaching with whatever hand is allowed - no matter what the angle/distance and whether or not the constraint has broken due to constraintForce GT grabStrength. mmmtodo this is a badly named parameter. More...
 
float BodyStiffness [set]
 Stiffness of upper body. Scales the arm grab such that the armStiffness is default when this is at default value. More...
 
float ReachAngle [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 OneSideReachAngle [set]
 Angle at which we will only reach with one hand. More...
 
float GrabDistance [set]
 Relative distance at which the grab starts. More...
 
float Move2Radius [set]
 Relative distance (additional to grabDistance - doesn't try to move inside grabDistance)at which the grab tries to use the balancer to move to the grab point. More...
 
float ArmStiffness [set]
 Stiffness of the arm. More...
 
float MaxReachDistance [set]
 Distance to reach out towards the grab point. More...
 
float OrientationConstraintScale [set]
 Scale torque used to rotate hands to face normals. More...
 
float MaxWristAngle [set]
 When we are grabbing the max angle the wrist ccan be at before we break the grab. More...
 
bool UseHeadLookToTarget [set]
 If true, the character will look at targetForHeadLook after a hand grabs until the end of the behavior. (Before grabbing it looks at the grab target). More...
 
bool LookAtGrab [set]
 If true, the character will look at the grab. More...
 
Vector3 TargetForHeadLook [set]
 Only used if useHeadLookToTarget is true, the target in world space to look at. 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

◆ GrabHelper()

GTA.NaturalMotion.GrabHelper.GrabHelper ( Ped  ped)

Creates a new Instance of the GrabHelper for sending a Grab Message to a given Ped.

Parameters
pedThe Ped to send the Grab Message to.

Property Documentation

◆ ArmStiffness

float GTA.NaturalMotion.GrabHelper.ArmStiffness
set

Stiffness of the arm.

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

◆ BodyStiffness

float GTA.NaturalMotion.GrabHelper.BodyStiffness
set

Stiffness of upper body. Scales the arm grab such that the armStiffness is default when this is at default value.

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

◆ DontLetGo

bool GTA.NaturalMotion.GrabHelper.DontLetGo
set

Once a constraint is made, keep reaching with whatever hand is allowed - no matter what the angle/distance and whether or not the constraint has broken due to constraintForce GT grabStrength. mmmtodo this is a badly named parameter.

Default value = False.

◆ DropWeaponDistance

float GTA.NaturalMotion.GrabHelper.DropWeaponDistance
set

Distance below which a weapon carrying hand will request weapon to be dropped.

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

◆ DropWeaponIfNecessary

bool GTA.NaturalMotion.GrabHelper.DropWeaponIfNecessary
set

If hasn't grabbed when weapon carrying hand is close to target, grab anyway.

Default value = False.

◆ FromEA

bool GTA.NaturalMotion.GrabHelper.FromEA
set

Use 2 point.

Default value = False.

◆ GrabDistance

float GTA.NaturalMotion.GrabHelper.GrabDistance
set

Relative distance at which the grab starts.

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

◆ GrabHoldMaxTimer

float GTA.NaturalMotion.GrabHelper.GrabHoldMaxTimer
set

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

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

◆ GrabStrength

float GTA.NaturalMotion.GrabHelper.GrabStrength
set

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

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

◆ HandsCollide

bool GTA.NaturalMotion.GrabHelper.HandsCollide
set

Hand collisions on when grabbing (false turns off hand collisions making grab more stable esp. To grab points slightly inside geometry).

Default value = False.

◆ InstanceIndex

int GTA.NaturalMotion.GrabHelper.InstanceIndex
set

LevelIndex of instance to grab (-1 = world coordinates).

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

◆ InstancePartIndex

int GTA.NaturalMotion.GrabHelper.InstancePartIndex
set

BoundIndex of part on instance to grab (0 = just use instance coordinates).

Default value = 0. Min value = 0.

◆ JustBrace

bool GTA.NaturalMotion.GrabHelper.JustBrace
set

Flag to toggle between grabbing and bracing.

Default value = False.

◆ LookAtGrab

bool GTA.NaturalMotion.GrabHelper.LookAtGrab
set

If true, the character will look at the grab.

Default value = True.

◆ MaxReachDistance

float GTA.NaturalMotion.GrabHelper.MaxReachDistance
set

Distance to reach out towards the grab point.

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

◆ MaxWristAngle

float GTA.NaturalMotion.GrabHelper.MaxWristAngle
set

When we are grabbing the max angle the wrist ccan be at before we break the grab.

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

◆ Move2Radius

float GTA.NaturalMotion.GrabHelper.Move2Radius
set

Relative distance (additional to grabDistance - doesn't try to move inside grabDistance)at which the grab tries to use the balancer to move to the grab point.

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

◆ NormalL

Vector3 GTA.NaturalMotion.GrabHelper.NormalL
set

Normal for the left grab point.

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

◆ NormalL2

Vector3 GTA.NaturalMotion.GrabHelper.NormalL2
set

Normal for the 3rd left grab point (if pointsX4grab=true).

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

◆ NormalR

Vector3 GTA.NaturalMotion.GrabHelper.NormalR
set

Normal for the right grab point.

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

◆ NormalR2

Vector3 GTA.NaturalMotion.GrabHelper.NormalR2
set

Normal for the 2nd right grab point (if pointsX4grab=true).

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

◆ OneSideReachAngle

float GTA.NaturalMotion.GrabHelper.OneSideReachAngle
set

Angle at which we will only reach with one hand.

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

◆ OrientationConstraintScale

float GTA.NaturalMotion.GrabHelper.OrientationConstraintScale
set

Scale torque used to rotate hands to face normals.

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

◆ PointsX4grab

bool GTA.NaturalMotion.GrabHelper.PointsX4grab
set

Use 2 point.

Default value = False.

◆ Pos1

Vector3 GTA.NaturalMotion.GrabHelper.Pos1
set

Grab pos1, right hand if not using line or surface grab.

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

◆ Pos2

Vector3 GTA.NaturalMotion.GrabHelper.Pos2
set

Grab pos2, left hand if not using line or surface grab.

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

◆ Pos3

Vector3 GTA.NaturalMotion.GrabHelper.Pos3
set

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

◆ Pos4

Vector3 GTA.NaturalMotion.GrabHelper.Pos4
set

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

◆ PullUpStrengthLeft

float GTA.NaturalMotion.GrabHelper.PullUpStrengthLeft
set

Strength to pull up with the left arm. 0 = no pull up.

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

◆ PullUpStrengthRight

float GTA.NaturalMotion.GrabHelper.PullUpStrengthRight
set

Strength to pull up with the right arm. 0 = no pull up.

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

◆ PullUpTime

float GTA.NaturalMotion.GrabHelper.PullUpTime
set

Time to reach the full pullup strength.

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

◆ ReachAngle

float GTA.NaturalMotion.GrabHelper.ReachAngle
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 = 2.8f. Min value = 0.0f. Max value = 3.0f.

◆ StickyHands

float GTA.NaturalMotion.GrabHelper.StickyHands
set

Strength of cheat force on hands to pull towards target and stick to target ("cleverHandIK" strength).

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

◆ SurfaceGrab

bool GTA.NaturalMotion.GrabHelper.SurfaceGrab
set

Toggle surface grab on. Requires pos1,pos2,pos3 and pos4 to be specified.

Default value = False.

◆ TargetForHeadLook

Vector3 GTA.NaturalMotion.GrabHelper.TargetForHeadLook
set

Only used if useHeadLookToTarget is true, the target in world space to look at.

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

◆ TurnToTarget

TurnType GTA.NaturalMotion.GrabHelper.TurnToTarget
set

Default value = TurnType.ToTarget.

◆ UseHeadLookToTarget

bool GTA.NaturalMotion.GrabHelper.UseHeadLookToTarget
set

If true, the character will look at targetForHeadLook after a hand grabs until the end of the behavior. (Before grabbing it looks at the grab target).

Default value = False.

◆ UseLeft

bool GTA.NaturalMotion.GrabHelper.UseLeft
set

Flag to toggle use of left hand.

Default value = False.

◆ UseLineGrab

bool GTA.NaturalMotion.GrabHelper.UseLineGrab
set

Use the line grab, Grab along the line (x-x2).

Default value = False.

◆ UseRight

bool GTA.NaturalMotion.GrabHelper.UseRight
set

Flag to toggle the use of the Right hand.

Default value = False.


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