Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CharacterCommandSwim.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_CharacterCommandSwimST
 

Functions

class SCR_CharacterCommandSwimST SCR_CharacterCommandSwim (BaseAnimPhysComponent pAnimPhysComponent, SCR_CharacterCommandSwimST pTable, ChimeraCharacter pCharacter, CharacterControllerComponent pController)
 
void SCR_CharacterCommandSwimST (CharacterAnimationComponent pAnimationComponent)
 
void StartSwimming ()
 
void EndSwimming ()
 
void UpdateWaterDepth ()
 empty, does nothing More...
 
override void OnActivate ()
 
override void OnDeactivate ()
 
override void PreAnimUpdate (float pDt)
 
override void PrePhysUpdate (float pDt)
 
override bool PostPhysUpdate (float pDt)
 called when all animation / pre phys update is handled More...
 

Variables

TAnimGraphCommand m_CmdStartSwimming
 
TAnimGraphVariable m_VarSpeed
 command to start swimming More...
 
TAnimGraphVariable m_VarDirection
 float variable - 0,1,2,3 speed More...
 
TAnimGraphTag m_TagIsSwimming
 float variable - angle More...
 
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 More...
 
float m_fWaterAlignV
 char's depth More...
 
float m_fSpeedX
 filter value More...
 
float m_fSpeedZ
 x speed More...
 
float m_fSpeedXV
 x speed More...
 
float m_fSpeedZV
 filter value More...
 
float m_fMovementSpeed = 0.7
 filter value More...
 
float m_fMovementSpeedFltTime = 0.3
 
float m_fMovementSpeedFltMaxChange = 1
 
float m_fWaterLevelSwim = 1.4
 when swimming - entity position depth (1.4 m) More...
 
float m_fWaterLevelIn = 1.5
 when entering water - what level cases swimming (1.5m) More...
 
float m_fWaterLevelOut = 1.3
 

Function Documentation

◆ EndSwimming()

void EndSwimming ( )

Definition at line 44 of file SCR_CharacterCommandSwim.c.

◆ OnActivate()

override void OnActivate ( )

Definition at line 61 of file SCR_CharacterCommandSwim.c.

◆ OnDeactivate()

override void OnDeactivate ( )

Definition at line 68 of file SCR_CharacterCommandSwim.c.

◆ PostPhysUpdate()

override bool 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)

Definition at line 198 of file SCR_CharacterCommandSwim.c.

◆ PreAnimUpdate()

override void PreAnimUpdate ( float  pDt)

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

Definition at line 76 of file SCR_CharacterCommandSwim.c.

◆ PrePhysUpdate()

override void 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

Definition at line 139 of file SCR_CharacterCommandSwim.c.

◆ SCR_CharacterCommandSwim()

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

Definition at line 29 of file SCR_CharacterCommandSwim.c.

◆ SCR_CharacterCommandSwimST()

void SCR_CharacterCommandSwim::SCR_CharacterCommandSwimST ( CharacterAnimationComponent  pAnimationComponent)

Definition at line 4 of file SCR_CharacterCommandSwim.c.

◆ StartSwimming()

void StartSwimming ( )

Definition at line 38 of file SCR_CharacterCommandSwim.c.

◆ UpdateWaterDepth()

void UpdateWaterDepth ( )

empty, does nothing

Definition at line 51 of file SCR_CharacterCommandSwim.c.

Variable Documentation

◆ m_AnimationComponent

CharacterAnimationComponent m_AnimationComponent

Definition at line 218 of file SCR_CharacterCommandSwim.c.

◆ m_bNeedFinish

bool m_bNeedFinish

Definition at line 222 of file SCR_CharacterCommandSwim.c.

◆ m_CmdStartSwimming

TAnimGraphCommand m_CmdStartSwimming

Definition at line 12 of file SCR_CharacterCommandSwim.c.

◆ m_fCharacterDepth

float m_fCharacterDepth

water depth

Definition at line 225 of file SCR_CharacterCommandSwim.c.

◆ m_fMovementSpeed

float m_fMovementSpeed = 0.7

filter value

settings

Definition at line 234 of file SCR_CharacterCommandSwim.c.

◆ m_fMovementSpeedFltMaxChange

float m_fMovementSpeedFltMaxChange = 1

Definition at line 236 of file SCR_CharacterCommandSwim.c.

◆ m_fMovementSpeedFltTime

float m_fMovementSpeedFltTime = 0.3

Definition at line 235 of file SCR_CharacterCommandSwim.c.

◆ m_fSpeedX

float m_fSpeedX

filter value

Definition at line 228 of file SCR_CharacterCommandSwim.c.

◆ m_fSpeedXV

float m_fSpeedXV

x speed

Definition at line 230 of file SCR_CharacterCommandSwim.c.

◆ m_fSpeedZ

float m_fSpeedZ

x speed

Definition at line 229 of file SCR_CharacterCommandSwim.c.

◆ m_fSpeedZV

float m_fSpeedZV

filter value

Definition at line 231 of file SCR_CharacterCommandSwim.c.

◆ m_fTime

float m_fTime

Definition at line 221 of file SCR_CharacterCommandSwim.c.

◆ m_fWaterAlignV

float m_fWaterAlignV

char's depth

Definition at line 226 of file SCR_CharacterCommandSwim.c.

◆ m_fWaterLevelDepth

float m_fWaterLevelDepth

Definition at line 224 of file SCR_CharacterCommandSwim.c.

◆ m_fWaterLevelIn

float m_fWaterLevelIn = 1.5

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

Definition at line 238 of file SCR_CharacterCommandSwim.c.

◆ m_fWaterLevelOut

float m_fWaterLevelOut = 1.3

Definition at line 239 of file SCR_CharacterCommandSwim.c.

◆ m_fWaterLevelSwim

float m_fWaterLevelSwim = 1.4

when swimming - entity position depth (1.4 m)

Definition at line 237 of file SCR_CharacterCommandSwim.c.

◆ m_Input

Definition at line 217 of file SCR_CharacterCommandSwim.c.

◆ m_pCharacter

ChimeraCharacter m_pCharacter

Definition at line 216 of file SCR_CharacterCommandSwim.c.

◆ m_Table

Definition at line 220 of file SCR_CharacterCommandSwim.c.

◆ m_TagIsSwimming

TAnimGraphTag m_TagIsSwimming

float variable - angle

Definition at line 15 of file SCR_CharacterCommandSwim.c.

◆ m_VarDirection

TAnimGraphVariable m_VarDirection

float variable - 0,1,2,3 speed

Definition at line 14 of file SCR_CharacterCommandSwim.c.

◆ m_VarSpeed

TAnimGraphVariable m_VarSpeed

command to start swimming

Definition at line 13 of file SCR_CharacterCommandSwim.c.