Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SCR_CharacterCommandSwim Interface Reference
Inheritance diagram for SCR_CharacterCommandSwim:
[legend]

Public Member Functions

void SCR_CharacterCommandSwim (BaseAnimPhysComponent pAnimPhysComponent, SCR_CharacterCommandSwimST pTable, ChimeraCharacter pCharacter, CharacterControllerComponent pController)
 
void StartSwimming ()
 
void EndSwimming ()
 
void UpdateWaterDepth ()
 empty, does nothing
 
override void OnActivate ()
 virtual to be overridden called when command starts
 
override void OnDeactivate ()
 called when command ends
 
override void PreAnimUpdate (float pDt)
 override this ! called before any animation is processed here change animation values, add animation commands

 
override void PrePhysUpdate (float pDt)
 called to change local translations / rotations called to get events / tags from animation graph processing

 
override bool PostPhysUpdate (float pDt)
 called when all animation / pre phys update is handled
 
- Public Member Functions inherited from AnimPhysCommandScripted
void OnActivate ()
 virtual to be overridden called when command starts
 
void OnDeactivate ()
 called when command ends
 
proto native bool IsFlagAutoDelete ()
 autodelete flag (when set, agent will delete the command after returning PreAnimUpdate or PostPhysicsUpdate automaticaly) usable for additive commands
 
proto native void SetFlagAutoDelete (bool pV)
 
proto native void SetFlagFinished (bool pFinished)
 this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );
 
proto native bool IsFlagFinished ()
 
void PreAnimUpdate (float pDt)
 override this ! called before any animation is processed here change animation values, add animation commands

 
proto native void PreAnim_CallCommand (int pCommand, int pParamInt, float pParamFloat)
 
proto native void PreAnim_CallCommand4I (int pCommand, int pParamInt1, int pParamInt2, int pParamInt3, int pParamInt4, float pParamFloat)
 
proto native void PreAnim_SetFloat (int pVar, float pFlt)
 
proto native void PreAnim_SetInt (int pVar, int pInt)
 
proto native void PreAnim_SetBool (int pVar, bool pBool)
 
proto native void PreAnim_SetAttachment (string bindingName, string animGraphResourceName, string animInstanceResourceName, string startingNodeName)
 
void PrePhysUpdate (float pDt)
 override this ! after animation is processed, before physics is processed
 
proto native bool PrePhys_IsEvent (int pEvent)
 script function usable in PrePhysUpdate
 
proto native bool PrePhys_IsTag (int pTag)
 
proto bool PrePhys_GetPredictionEval (int pPrediction, out int pGlobalBoneIndex, out bool pIsTranslation, out bool pIsRotation, out vector pOutTransl, out float pOutRot[4], out float pTimeToPrediction, out float pNormTimeInAnims)
 
proto native bool PrePhys_GetTranslation (out vector pOutTransl)
 
proto native bool PrePhys_GetRotation (out float pOutRot[4])
 
proto native void PrePhys_SetTranslation (vector pInTransl)
 
proto native void PrePhys_SetRotation (float pInRot[4])
 
bool PostPhysUpdate (float pDt)
 override this ! final adjustment of physics state (after physics was applied) returns true if command continues running / false if command should end (or you can use SetFlagFinished(true))
 
proto native void PostPhys_GetPosition (out vector pOutTransl)
 script function usable in PostPhysUpdate
 
proto native void PostPhys_GetRotation (out float pOutRot[4])
 
proto native void PostPhys_SetPosition (vector pInTransl)
 
proto native void PostPhys_SetRotation (float pInRot[4])
 
proto native void PostPhys_LockRotation ()
 

Public Attributes

ChimeraCharacter m_pCharacter
 
CharacterInputContext m_Input
 
CharacterAnimationComponent m_AnimationComponent
 
SCR_CharacterCommandSwimST m_Table
 
float m_fTime
 
bool m_bNeedFinish
 
float m_fWaterLevelDepth
 
float m_fCharacterDepth
 water depth
 
float m_fWaterAlignV
 char's depth
 
float m_fSpeedX
 filter value
 
float m_fSpeedZ
 x speed
 
float m_fSpeedXV
 x speed
 
float m_fSpeedZV
 filter value
 
float m_fMovementSpeed = 0.7
 filter value
 
float m_fMovementSpeedFltTime = 0.3
 
float m_fMovementSpeedFltMaxChange = 1
 
float m_fWaterLevelSwim = 1.4
 when swimming - entity position depth (1.4 m)
 
float m_fWaterLevelIn = 1.5
 when entering water - what level cases swimming (1.5m)
 
float m_fWaterLevelOut = 1.3
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptedCommand
void ScriptedCommand (BaseAnimPhysComponent pAnimPhysComponent)
 
- Protected Member Functions inherited from AnimPhysCommandScripted
void AnimPhysCommandScripted ()
 constructor is protected - we don't wnat instances of this "abstract" class
 

Constructor & Destructor Documentation

◆ SCR_CharacterCommandSwim()

void SCR_CharacterCommandSwim.SCR_CharacterCommandSwim ( BaseAnimPhysComponent  pAnimPhysComponent,
SCR_CharacterCommandSwimST  pTable,
ChimeraCharacter  pCharacter,
CharacterControllerComponent  pController 
)

Member Function Documentation

◆ EndSwimming()

void SCR_CharacterCommandSwim.EndSwimming ( )

◆ OnActivate()

override void SCR_CharacterCommandSwim.OnActivate ( )

virtual to be overridden called when command starts

Implements AnimPhysCommandScripted.

◆ OnDeactivate()

override void SCR_CharacterCommandSwim.OnDeactivate ( )

called when command ends

Implements AnimPhysCommandScripted.

◆ PostPhysUpdate()

override bool SCR_CharacterCommandSwim.PostPhysUpdate ( float  pDt)

called when all animation / pre phys update is handled

finish if water level is smaller than some value (around 1m of depth)

Implements AnimPhysCommandScripted.

◆ PreAnimUpdate()

override void SCR_CharacterCommandSwim.PreAnimUpdate ( float  pDt)

override this ! called before any animation is processed here change animation values, add animation commands

if movement moves front - remap 0,1,2,3 to 0,2,3 (in animation graph)

handle animation swimming speed

rotate character (directly by heading angle - with filtering)

update time

Implements AnimPhysCommandScripted.

◆ PrePhysUpdate()

override void SCR_CharacterCommandSwim.PrePhysUpdate ( float  pDt)

called to change local translations / rotations called to get events / tags from animation graph processing

move from m_fCharacterDepth to m_pSettings->m_fWaterLevelSwim

get filtered part

set filtered part as movement

get local translations

height correction

XZ side translation

Implements AnimPhysCommandScripted.

◆ StartSwimming()

void SCR_CharacterCommandSwim.StartSwimming ( )

◆ UpdateWaterDepth()

void SCR_CharacterCommandSwim.UpdateWaterDepth ( )

empty, does nothing

Member Data Documentation

◆ m_AnimationComponent

CharacterAnimationComponent SCR_CharacterCommandSwim.m_AnimationComponent

◆ m_bNeedFinish

bool SCR_CharacterCommandSwim.m_bNeedFinish

◆ m_fCharacterDepth

float SCR_CharacterCommandSwim.m_fCharacterDepth

water depth

◆ m_fMovementSpeed

float SCR_CharacterCommandSwim.m_fMovementSpeed = 0.7

filter value

settings

◆ m_fMovementSpeedFltMaxChange

float SCR_CharacterCommandSwim.m_fMovementSpeedFltMaxChange = 1

◆ m_fMovementSpeedFltTime

float SCR_CharacterCommandSwim.m_fMovementSpeedFltTime = 0.3

◆ m_fSpeedX

float SCR_CharacterCommandSwim.m_fSpeedX

filter value

◆ m_fSpeedXV

float SCR_CharacterCommandSwim.m_fSpeedXV

x speed

◆ m_fSpeedZ

float SCR_CharacterCommandSwim.m_fSpeedZ

x speed

◆ m_fSpeedZV

float SCR_CharacterCommandSwim.m_fSpeedZV

filter value

◆ m_fTime

float SCR_CharacterCommandSwim.m_fTime

◆ m_fWaterAlignV

float SCR_CharacterCommandSwim.m_fWaterAlignV

char's depth

◆ m_fWaterLevelDepth

float SCR_CharacterCommandSwim.m_fWaterLevelDepth

◆ m_fWaterLevelIn

float SCR_CharacterCommandSwim.m_fWaterLevelIn = 1.5

when entering water - what level cases swimming (1.5m)

◆ m_fWaterLevelOut

float SCR_CharacterCommandSwim.m_fWaterLevelOut = 1.3

◆ m_fWaterLevelSwim

float SCR_CharacterCommandSwim.m_fWaterLevelSwim = 1.4

when swimming - entity position depth (1.4 m)

◆ m_Input

CharacterInputContext SCR_CharacterCommandSwim.m_Input

◆ m_pCharacter

ChimeraCharacter SCR_CharacterCommandSwim.m_pCharacter

◆ m_Table

SCR_CharacterCommandSwimST SCR_CharacterCommandSwim.m_Table

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