Class ConfigureBalanceHelper
This single message allows you to configure various parameters used on any behavior that uses the dynamic balance.
Inherited Members
Namespace: GTA.NaturalMotion
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class ConfigureBalanceHelper : CustomHelper
Constructors
| Improve this Doc View SourceConfigureBalanceHelper(Ped)
Creates a new Instance of the ConfigureBalanceHelper for sending a ConfigureBalance Message to a given Ped.
Declaration
public ConfigureBalanceHelper(Ped ped)
Parameters
Type | Name | Description |
---|---|---|
Ped | ped |
Remarks
This single message allows you to configure various parameters used on any behavior that uses the dynamic balance.
Properties
| Improve this Doc View SourceAirborneStep
When airborne try to step. Set to false for e.g. shotGun reaction.
Declaration
public bool AirborneStep { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
AlwaysStepWithFarthest
Declaration
public bool AlwaysStepWithFarthest { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
AnkleEquilibrium
Ankle equilibrium angle used when static balancing.
Declaration
public float AnkleEquilibrium { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = -1.0f. Max value = 1.0f.
AvoidFeedback
NB. Very sensitive. Avoid tries to not step across a line of the inside of the stance leg's foot. Avoid doesn't allow the desired stepping foot to cross the line. avoidFeedback = how much of the actual crossing of that line is fedback as an error.
Declaration
public float AvoidFeedback { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.6f. Min value = 0.0f. Max value = 2.0f.
AvoidFootWidth
NB. Very sensitive. Avoid tries to not step across a line of the inside of the stance leg's foot. AvoidFootWidth = how much inwards from the ankle this line is in (m).
Declaration
public float AvoidFootWidth { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 1.0f.
AvoidLeg
If true then balancer tries to avoid leg2leg collisions/avoid crossing legs. Avoid tries to not step across a line of the inside of the stance leg's foot.
Declaration
public bool AvoidLeg { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
BackwardsLeanCutoff
Backwards lean threshold to cut off stay upright forces. 0.0 Vertical - 1.0 horizontal. 0.6 is a sensible value. NB: the balancer does not fail in order to give stagger that extra step as it falls. A backwards lean of GT 0.6 will generally mean the balancer will soon fail without stayUpright forces.
Declaration
public float BackwardsLeanCutoff { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.1f. Min value = 0.0f. Max value = 2.0f.
BalanceAbortThreshold
When the character gives up and goes into a fall. Larger values mean that the balancer can lean more before failing.
Declaration
public float BalanceAbortThreshold { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.6f. Min value = 0.0f. Max value = 1.0f.
BalanceAbortThresholdEnd
If this value is different from balanceAbortThreshold, actual balanceAbortThreshold will be ramped toward this value.
Declaration
public float BalanceAbortThresholdEnd { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.6f. Min value = 0.0f. Max value = 1.0f.
BalanceIndefinitely
Ignore maxSteps and maxBalanceTime and try to balance forever.
Declaration
public bool BalanceIndefinitely { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
ChangeStepTime
Time not in contact (airborne) before step is changed. If -ve don't change step.
Declaration
public float ChangeStepTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -1.0f. Min value = -1.0f. Max value = 5.0f.
DepthFudge
Supposed to increase foot friction: Impact depth of a collision with the foot is changed when the balancer is running - impact.SetDepth(impact.GetDepth() - depthFudge).
Declaration
public float DepthFudge { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
DepthFudgeStagger
Supposed to increase foot friction: Impact depth of a collision with the foot is changed when staggerFall is running - impact.SetDepth(impact.GetDepth() - depthFudgeStagger).
Declaration
public float DepthFudgeStagger { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
DontStepTime
Amount of time at the start of a balance before the character is allowed to start stepping.
Declaration
public float DontStepTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f.
ExtraFeetApart
Additional feet apart setting.
Declaration
public float ExtraFeetApart { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = -1.0f. Max value = 1.0f.
ExtraSteps
Allow the balancer to take this many more steps before hitting maxSteps. If negative nothing happens(safe default).
Declaration
public int ExtraSteps { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = -1. Min value = -1.
ExtraTime
Allow the balancer to balance for this many more seconds before hitting maxBalanceTime. If negative nothing happens(safe default).
Declaration
public float ExtraTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -1.0f. Min value = -1.0f.
FailMustCollide
The upper body of the character must be colliding and other failure conditions met to fail.
Declaration
public bool FailMustCollide { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
FallMult
Multiply the rampDown of stiffness on falling by this amount ( GT 1 fall quicker).
Declaration
public float FallMult { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 100.0f.
FallReduceGravityComp
Reduce gravity compensation as the legs weaken on falling.
Declaration
public bool FallReduceGravityComp { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
FallType
How to fall after maxSteps or maxBalanceTime.
Declaration
public FallType FallType { set; }
Property Value
Type | Description |
---|---|
FallType |
Remarks
Default value = RampDownStiffness. If Slump BCR has to be active.
FlatterStaticFeet
Declaration
public bool FlatterStaticFeet { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
FlatterSwingFeet
Declaration
public bool FlatterSwingFeet { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
FootFriction
Foot friction multiplier is multiplied by this amount if balancer is running.
Declaration
public float FootFriction { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 40.0f.
FootFrictionStagger
Foot friction multiplier is multiplied by this amount if staggerFall is running.
Declaration
public float FootFrictionStagger { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 40.0f.
FootSlipCompOnMovingFloor
This parameter will be removed when footSlipCompensation preserves the foot angle on a moving floor]. If the character detects a moving floor and footSlipCompOnMovingFloor is false then it will turn off footSlipCompensation - at footSlipCompensation preserves the global heading of the feet. If footSlipCompensation is off then the character usually turns to the side in the end although when turning the vehicle turns it looks promising for a while.
Declaration
public bool FootSlipCompOnMovingFloor { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
GiveUpHeight
Height between lowest foot and COM below which balancer will give up.
Declaration
public float GiveUpHeight { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 1.5f.
GiveUpHeightEnd
If this value is different from giveUpHeight, actual giveUpHeight will be ramped toward this value.
Declaration
public float GiveUpHeightEnd { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 1.5f.
GiveUpRampDuration
Duration of ramp from start of behavior for above two parameters. If smaller than 0, no ramp is applied.
Declaration
public float GiveUpRampDuration { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -1.0f. Min value = -1.0f. Max value = 10.0f.
HipLeanAcc
Multiplier on the floorAcceleration added to the leanHips.
Declaration
public float HipLeanAcc { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 1.0f.
IgnoreFailure
Ignore maxSteps and maxBalanceTime and try to balance forever.
Declaration
public bool IgnoreFailure { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
LeanAcc
Multiplier on the floorAcceleration added to the lean.
Declaration
public float LeanAcc { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
LeanAccMax
Max floorAcceleration allowed for lean and leanHips.
Declaration
public float LeanAccMax { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 5.0f. Min value = 0.0f. Max value = 10.0f.
LeanAgainstVelocity
Declaration
public float LeanAgainstVelocity { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
LeanToAbort
Lean at which to send abort message when maxSteps or maxBalanceTime is reached.
Declaration
public float LeanToAbort { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.6f. Min value = 0.0f. Max value = 1.0f.
LeftLegSwingDamping
Damping of left leg during swing phase (mmmmDrunk used 1.25 to slow legs movement).
Declaration
public float LeftLegSwingDamping { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.2f. Max value = 4.0f.
LegsApartMax
FRICTION WORKAROUND: if the legs end up more than (legsApartMax + hipwidth) apart when balanced, adjust the feet positions to slide back so they are legsApartMax + hipwidth apart. Needs to be less than legsApartRestep to see any effect.
Declaration
public float LegsApartMax { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 2.0f. Min value = 0.0f. Max value = 2.0f.
LegsApartRestep
If the legs end up more than (legsApartRestep + hipwidth) apart even though balanced, take another step.
Declaration
public float LegsApartRestep { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.2f. Min value = 0.0f. Max value = 1.0f.
LegStiffness
Stiffness of legs.
Declaration
public float LegStiffness { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 12.0f. Min value = 6.0f. Max value = 16.0f.
LegsTogetherRestep
Mmmm0.1 for drunk if the legs end up less than (hipwidth - legsTogetherRestep) apart even though balanced, take another step. A value of 1 will turn off this feature and the max value is hipWidth = 0.23f by default but is model dependent.
Declaration
public float LegsTogetherRestep { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 1.0f.
MaxBalanceTime
Maximum time(seconds) that the balancer will balance for.
Declaration
public float MaxBalanceTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 50.0f. Min value = 1.0f.
MaxSteps
Maximum number of steps that the balancer will take.
Declaration
public int MaxSteps { set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Default value = 100. Min value = 1.
MinKneeAngle
Minimum knee angle (-ve value will mean this functionality is not applied). 0.4 seems a good value.
Declaration
public float MinKneeAngle { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = -0.5f. Min value = -0.5f. Max value = 1.5f.
MovingFloor
Temporary variable to ignore movingFloor code that generally causes the character to fall over if the feet probe a moving object e.g. treading on a gun.
Declaration
public bool MovingFloor { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
OpposeGravityAnkles
Gravity opposition applied to ankles. General balancer likes 1.0. StaggerFall likes 0.1.
Declaration
public float OpposeGravityAnkles { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 4.0f.
OpposeGravityLegs
Gravity opposition applied to hips and knees.
Declaration
public float OpposeGravityLegs { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 4.0f.
PredictionTime
Amount of time (seconds) into the future that the character tries to step to. Bigger values try to recover with fewer, bigger steps. Smaller values recover with smaller steps, and generally recover less.
Declaration
public float PredictionTime { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.2f. Min value = 0.0f. Max value = 1.0f.
PredictionTimeHip
Amount of time (seconds) into the future that the character tries to move hip to (kind of). Will be controlled by balancer in future but can help recover spine quicker from bending forwards to much.
Declaration
public float PredictionTimeHip { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.3f. Min value = -1.0f. Max value = 1.0f.
PredictionTimeVariance
Variance in predictionTime every step. If negative only takes away from predictionTime.
Declaration
public float PredictionTimeVariance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = -1.0f. Max value = 1.0f.
RampHipPitchOnFail
Bend over when falling after maxBalanceTime.
Declaration
public bool RampHipPitchOnFail { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
ResistAcc
Level of cheat force added to character to resist the effect of floorAcceleration (anti-Acceleration) - added to upperbody.
Declaration
public float ResistAcc { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.5f. Min value = 0.0f. Max value = 2.0f.
ResistAccMax
Max floorAcceleration allowed for anti-Acceleration. If GT 20.0 then it is probably in a crash.
Declaration
public float ResistAccMax { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 3.0f. Min value = 0.0f. Max value = 20.0f.
RightLegSwingDamping
Damping of right leg during swing phase (mmmmDrunk used 1.25 to slow legs movement).
Declaration
public float RightLegSwingDamping { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.2f. Max value = 4.0f.
StableLinSpeedThresh
Linear speed threshold for successful balance.
Declaration
public float StableLinSpeedThresh { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.3f. Min value = 0.0f. Max value = 10.0f.
StableRotSpeedThresh
Rotational speed threshold for successful balance.
Declaration
public float StableRotSpeedThresh { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.3f. Min value = 0.0f. Max value = 10.0f.
StandUp
Standup more with increased velocity.
Declaration
public bool StandUp { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = False.
StepClampScale
Declaration
public float StepClampScale { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 1.0f. Min value = 0.0f. Max value = 1.0f.
StepClampScaleVariance
Variance in clamp scale every step. If negative only takes away from clampScale.
Declaration
public float StepClampScaleVariance { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = -1.0f. Max value = 1.0f.
StepDecisionThreshold
Declaration
public float StepDecisionThreshold { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 1.0f.
StepHeight
Maximum height that character steps vertically (above 0.2 is high ... But OK underwater).
Declaration
public float StepHeight { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 0.4f.
StepHeightInc4Step
Added to stepHeight if going up steps.
Declaration
public float StepHeightInc4Step { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.1f. Min value = 0.0f. Max value = 0.4f.
StepIfInSupport
The balancer sometimes decides to step even if balanced.
Declaration
public bool StepIfInSupport { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
TaperKneeStrength
Does the knee strength reduce with angle.
Declaration
public bool TaperKneeStrength { set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Default value = True.
UseComDirTurnVelThresh
Velocity below which the balancer turns in the direction of the COM forward instead of the ComVel - for use with shot from running with high upright constraint use 1.9.
Declaration
public float UseComDirTurnVelThresh { set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Default value = 0.0f. Min value = 0.0f. Max value = 10.0f.