Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
SCR_PhysicsHelper Interface Reference

SCR_Physics Class. More...

Public Member Functions

void TraceSegmented (vector start, vector end, TraceFlags flags=TraceFlags.DEFAULT, EPhysicsLayerDefs layerMask=EPhysicsLayerDefs.Default, array< IEntity > excludeArray=null, float segmentSize=DEFAULT_TRACE_SEGMENT_LENGTH)
 Does trace for long distance as a series of shorter traces across multiple frames, for performance improvements.
 
ScriptInvoker GetOnTraceFinished ()
 

Static Public Member Functions

static void InitPhysicsHelper ()
 
static int RemapInteractionLayer (notnull Physics physicsObject, EPhysicsLayerDefs inputLayer, EPhysicsLayerDefs replaceLayer)
 Iterates through a physics object's colliders and remaps the input physics interaction layer to the replace physics interaction layer Returns how many colliders were remapped.
 
static void ChangeSimulationState (IEntity ent, SimulationState simState, bool recursively=false)
 

Static Public Attributes

static ref array< ref Shape > m_aDebugShapes = {}
 

Protected Attributes

vector m_vCurrentStartPosition
 
vector m_vCurrentEndPosition
 
vector m_vOriginalEnd
 
vector m_vOriginalStart
 
vector m_vDirection
 
float m_fLength
 
float m_fLengthTraced
 
ref ScriptInvoker< vector, IEntity > m_OnTraceFinished
 
ref TraceParam m_TraceParam
 

Static Protected Attributes

const float DEFAULT_TRACE_SEGMENT_LENGTH = 100
 

Detailed Description

SCR_Physics Class.

Contains various physics functions

Member Function Documentation

◆ ChangeSimulationState()

static void SCR_PhysicsHelper.ChangeSimulationState ( IEntity  ent,
SimulationState  simState,
bool  recursively = false 
)
static

◆ GetOnTraceFinished()

ScriptInvoker SCR_PhysicsHelper.GetOnTraceFinished ( )

◆ InitPhysicsHelper()

static void SCR_PhysicsHelper.InitPhysicsHelper ( )
static

◆ RemapInteractionLayer()

static int SCR_PhysicsHelper.RemapInteractionLayer ( notnull Physics  physicsObject,
EPhysicsLayerDefs  inputLayer,
EPhysicsLayerDefs  replaceLayer 
)
static

Iterates through a physics object's colliders and remaps the input physics interaction layer to the replace physics interaction layer Returns how many colliders were remapped.

◆ TraceSegmented()

void SCR_PhysicsHelper.TraceSegmented ( vector  start,
vector  end,
TraceFlags  flags = TraceFlags::DEFAULT,
EPhysicsLayerDefs  layerMask = EPhysicsLayerDefs::Default,
array< IEntity >  excludeArray = null,
float  segmentSize = DEFAULT_TRACE_SEGMENT_LENGTH 
)

Does trace for long distance as a series of shorter traces across multiple frames, for performance improvements.

Subscribe to m_OnTraceFinished<vector, IEntity> that gets invoked after the trace is done. Create new instance of SCR_PhysicsHelper when you want to do a trace.

Member Data Documentation

◆ DEFAULT_TRACE_SEGMENT_LENGTH

const float SCR_PhysicsHelper.DEFAULT_TRACE_SEGMENT_LENGTH = 100
staticprotected

◆ m_aDebugShapes

ref array<ref Shape> SCR_PhysicsHelper.m_aDebugShapes = {}
static

◆ m_fLength

float SCR_PhysicsHelper.m_fLength
protected

◆ m_fLengthTraced

float SCR_PhysicsHelper.m_fLengthTraced
protected

◆ m_OnTraceFinished

ref ScriptInvoker<vector, IEntity> SCR_PhysicsHelper.m_OnTraceFinished
protected

◆ m_TraceParam

ref TraceParam SCR_PhysicsHelper.m_TraceParam
protected

◆ m_vCurrentEndPosition

vector SCR_PhysicsHelper.m_vCurrentEndPosition
protected

◆ m_vCurrentStartPosition

vector SCR_PhysicsHelper.m_vCurrentStartPosition
protected

◆ m_vDirection

vector SCR_PhysicsHelper.m_vDirection
protected

◆ m_vOriginalEnd

vector SCR_PhysicsHelper.m_vOriginalEnd
protected

◆ m_vOriginalStart

vector SCR_PhysicsHelper.m_vOriginalStart
protected

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