Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_2DPiPScopeZeroingGenerator Interface Reference
Inheritance diagram for SCR_2DPiPScopeZeroingGenerator:
ScriptedBaseZeroingGenerator BaseZeroingGenerator

Public Member Functions

override bool WB_InitGenerator ()
 Initialize the generator.
 
override bool WB_GetZeroingData (float weaponAngle, float distance, out vector offset, out vector angles)
 Called to obtain zeroing data for a given weapon angle.
 
override float WB_CalculateWeaponZeroingAnimationValue (float pitch, float distance, out vector offset, out vector angles)
 Return the animation value for the sights animation.
 
- Public Member Functions inherited from ScriptedBaseZeroingGenerator
vector WB_GetPivotPoint ()
 Returns the pivot point of the sights.
 
void WB_CleanupGenerator ()
 Clean up.
 
- Public Member Functions inherited from BaseZeroingGenerator
proto external IEntity GetOwnerEntity ()
 Gets the owning entity of the generator object, which might or might not be the same as the owner of the Sights component.
 
proto external BaseSightsComponent GetSights ()
 Get the sights component that the zeroing is computed for.
 
proto external WeaponAnimationComponent GetWeaponAnimationComponent ()
 Get the Weapon animation component of the sights.
 
proto external void SetPointInfoGeneration (bool doGenerate)
 Flag the generation of PointInfo's.
 
proto external void SetProjectileResource (ResourceName resourceName)
 

Protected Attributes

ResourceName m_sReferenceProjectile
 
SCR_2DPIPSightsComponent m_SightsComponent
 
float m_fFovZoomed
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptedBaseZeroingGenerator
void OnInit (IEntity owner, BaseSightsComponent sights)
 Called on initialization.
 
void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 Called every frame when active to update current state.
 

Member Function Documentation

◆ WB_CalculateWeaponZeroingAnimationValue()

override float SCR_2DPiPScopeZeroingGenerator.WB_CalculateWeaponZeroingAnimationValue ( float pitch,
float distance,
out vector offset,
out vector angles )

Return the animation value for the sights animation.

This usually outputs a value that makes the sight line up with the eye as close as possible.

Parameters
pitchThe angle at which the weapon is held.
distanceThe distance this zeroing data is calculated for
offsetoutput Computed offset of the weapon to the eye position
anglesoutput Computed angles for holding the weapon
Returns
a float value, usually between 0 and 1, representing the percentage to forward into the sights animation

Implements ScriptedBaseZeroingGenerator.

◆ WB_GetZeroingData()

override bool SCR_2DPiPScopeZeroingGenerator.WB_GetZeroingData ( float weaponAngle,
float distance,
out vector offset,
out vector angles )

Called to obtain zeroing data for a given weapon angle.

Parameters
weaponAngleAngle how the weapon should be held
distanceThe distance this zeroing data is calculated for
offsetoutput Computed offset of the weapon to the eye position
anglesoutput Computed angles for holding the weapon
Returns
true if the value could be computed, false otherwise. Returning false usually implies that something catastrophic is wrong (missing sight component, missing owner, etc)

Implements ScriptedBaseZeroingGenerator.

◆ WB_InitGenerator()

override bool SCR_2DPiPScopeZeroingGenerator.WB_InitGenerator ( )

Initialize the generator.

Returns
False if the initialization failed. This can be a misconfiguration of the prefab or any other reason

Implements ScriptedBaseZeroingGenerator.

Member Data Documentation

◆ m_fFovZoomed

float SCR_2DPiPScopeZeroingGenerator.m_fFovZoomed
protected

◆ m_SightsComponent

SCR_2DPIPSightsComponent SCR_2DPiPScopeZeroingGenerator.m_SightsComponent
protected

◆ m_sReferenceProjectile

ResourceName SCR_2DPiPScopeZeroingGenerator.m_sReferenceProjectile
protected

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