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

Public Member Functions

proto external IEntity GetOwner ()
 
proto external void ForceSightsZeroValue (vector offset, vector angles, vector turnOffset)
 Allow to override Zeroing via aim modifier (only works in Workbench)
 
proto external void ForceSightsZeroValueEnablel (bool bOnOff)
 Disable forced zeroing data.
 
proto external bool IsSightADSActive ()
 
proto external float GetADSActivationPercentage ()
 
proto external float GetADSDeactivationPercentage ()
 
proto external bool AreSightsValid (bool front=true, bool rear=true)
 
proto external vector GetSightsRearPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets Start position should be the one closer to eye position than end position.
 
proto external vector GetSightsFrontPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets End position should be the one further from eye position than start position.
 
proto external vector GetSightsDirection (bool localSpace=false, bool normalize=true)
 Returns a direction vector from the rear sight position to the front sight position A vector is calculated from the rear sight to the front sight in such a way that GetSightsRearPosition() + GetSightsDirection() == GetSightsFrontPosition()
 
proto external vector GetSightsDirectionUntransformed (bool localSpace=false, bool normalize=true)
 Like GetSightsDirection, but ignores and bones associated with the sight points.
 
proto external vector GetSightsOffset ()
 Returns the local sights reference point offset.
 
proto external bool GetSightsTransform (out vector transform[4], bool localSpace=false)
 Returns the transform matrix of the local sights.
 
proto external float GetFOV ()
 Returns current value of field of view.
 
proto external vector GetCurrentSightsRange ()
 Returns current range info value where x: animation value y: distance z: unused.
 
proto external SightsFOVInfo GetFOVInfo ()
 Returns currently selected sights FOV info or null if none.
 
proto external float GetCameraRecoilAmount ()
 Percentage 0...1 of recoil that should be applied to camera when using this sights component.
 
proto external bool GetSightsPriority ()
 Boolean indicating whether this sight component is prioritized.
 
proto external bool GetSightsSkipSwitch ()
 Return true if the sights can be switched to.
 
proto external void SetSightsVisibility (float visFactor)
 Hide parts of the sight on ADS. 0 means completely visible, 1 means completely hidden.
 
proto external PointInfo GetPositionPointInfo ()
 
proto external PointInfo GetRearPositionPointInfo ()
 
proto external PointInfo GetFrontPositionPointInfo ()
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

bool WB_GetZeroingData (IEntity owner, BaseSightsComponent sights, float weaponAngle, out vector offset, out vector angles)
 Positive weapon angle tilts weapon upwards (muzzle goes up, stock goes down) Negative weapon angle tilts weapon downwards (muzzle goes down, stock goes up) Called from GameCode, do not remove!
 

Member Function Documentation

◆ AreSightsValid()

proto external bool BaseSightsComponent.AreSightsValid ( bool  front = true,
bool  rear = true 
)

◆ ForceSightsZeroValue()

proto external void BaseSightsComponent.ForceSightsZeroValue ( vector  offset,
vector  angles,
vector  turnOffset 
)

Allow to override Zeroing via aim modifier (only works in Workbench)

◆ ForceSightsZeroValueEnablel()

proto external void BaseSightsComponent.ForceSightsZeroValueEnablel ( bool  bOnOff)

Disable forced zeroing data.

◆ GetADSActivationPercentage()

proto external float BaseSightsComponent.GetADSActivationPercentage ( )

◆ GetADSDeactivationPercentage()

proto external float BaseSightsComponent.GetADSDeactivationPercentage ( )

◆ GetCameraRecoilAmount()

proto external float BaseSightsComponent.GetCameraRecoilAmount ( )

Percentage 0...1 of recoil that should be applied to camera when using this sights component.

◆ GetCurrentSightsRange()

proto external vector BaseSightsComponent.GetCurrentSightsRange ( )

Returns current range info value where x: animation value y: distance z: unused.

Returns
Returns sights info values or empty vector if none.

◆ GetFOV()

proto external float BaseSightsComponent.GetFOV ( )

Returns current value of field of view.

Returns
Current field of view value in degrees.

◆ GetFOVInfo()

proto external SightsFOVInfo BaseSightsComponent.GetFOVInfo ( )

Returns currently selected sights FOV info or null if none.

Returns
Current SightsFOVInfo or null if none.

◆ GetFrontPositionPointInfo()

proto external PointInfo BaseSightsComponent.GetFrontPositionPointInfo ( )

◆ GetOwner()

proto external IEntity BaseSightsComponent.GetOwner ( )

◆ GetPositionPointInfo()

proto external PointInfo BaseSightsComponent.GetPositionPointInfo ( )

◆ GetRearPositionPointInfo()

proto external PointInfo BaseSightsComponent.GetRearPositionPointInfo ( )

◆ GetSightsDirection()

proto external vector BaseSightsComponent.GetSightsDirection ( bool  localSpace = false,
bool  normalize = true 
)

Returns a direction vector from the rear sight position to the front sight position A vector is calculated from the rear sight to the front sight in such a way that GetSightsRearPosition() + GetSightsDirection() == GetSightsFrontPosition()

Parameters
localSpceWether returned vector is in local or world space
normalizeWether returned vector is normalized or not, independent of the weapon sight geometry

◆ GetSightsDirectionUntransformed()

proto external vector BaseSightsComponent.GetSightsDirectionUntransformed ( bool  localSpace = false,
bool  normalize = true 
)

Like GetSightsDirection, but ignores and bones associated with the sight points.

This is used to get an untransformed vector which might be needed if camera/optic and turret are rotating together.

◆ GetSightsFrontPosition()

proto external vector BaseSightsComponent.GetSightsFrontPosition ( bool  localSpace = false)

Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets End position should be the one further from eye position than start position.

Parameters
localSpaceWhether returned position should be in local space or world space

◆ GetSightsOffset()

proto external vector BaseSightsComponent.GetSightsOffset ( )

Returns the local sights reference point offset.

This corresponds to the set point info in base sights component. Returns zero vector if no point info is present.

◆ GetSightsPriority()

proto external bool BaseSightsComponent.GetSightsPriority ( )

Boolean indicating whether this sight component is prioritized.

◆ GetSightsRearPosition()

proto external vector BaseSightsComponent.GetSightsRearPosition ( bool  localSpace = false)

Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets Start position should be the one closer to eye position than end position.

Parameters
localSpaceWhether returned position should be in local space or world space

◆ GetSightsSkipSwitch()

proto external bool BaseSightsComponent.GetSightsSkipSwitch ( )

Return true if the sights can be switched to.

◆ GetSightsTransform()

proto external bool BaseSightsComponent.GetSightsTransform ( out vector  transform[4],
bool  localSpace = false 
)

Returns the transform matrix of the local sights.

This corresponds to the set point info in the base sights component.

Parameters
transformoutput Transformation matrix for the sight point
localSpaceif true, return the local space transformation of the sights. If false, returns the transformation in world space
Returns
true if the point is defined, false otherwise. If this function returns false, the output matrix is undefined

◆ IsSightADSActive()

proto external bool BaseSightsComponent.IsSightADSActive ( )

◆ SetSightsVisibility()

proto external void BaseSightsComponent.SetSightsVisibility ( float  visFactor)

Hide parts of the sight on ADS. 0 means completely visible, 1 means completely hidden.

◆ WB_GetZeroingData()

bool BaseSightsComponent.WB_GetZeroingData ( IEntity  owner,
BaseSightsComponent  sights,
float  weaponAngle,
out vector  offset,
out vector  angles 
)
protected

Positive weapon angle tilts weapon upwards (muzzle goes up, stock goes down) Negative weapon angle tilts weapon downwards (muzzle goes down, stock goes up) Called from GameCode, do not remove!

Implemented in SightsComponent.


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