Sniper and Ballistics System
Central singleton instance for accessing ballistics functionality.
Public Variables
Type | Name | Description | Access |
float |
| Current selected zero distance. | Read Only |
float |
| Bullet time chance percentage between [0,1]. | Read-Write |
float |
| Virtual timescale used in bullet time events. It affects the bullet's interpolation speed. | Read-Write |
float |
| Amount of time waited before resetting timescale when bullet time path has finished. | Read-Write |
float |
| Amount of time waited after timescale has been reset at the end of bullet time. | Read-Write |
bool |
| Enables/disables use of tracers. | Read-Write |
bool |
| Enables/disables use of bullet time. | Read-Write |
bool |
| Enables/disables use of in-game trajectory rendering. | Read-Write |
bool |
| Returns whether bullet time is active or not. | Read Only |
bool |
| If true, bullet will travel immediately without waiting during bullet time, until set to false. | Read-Write |
EnvironmentProperties |
| Returns the current environment properties assigned to this scene. | Read Only |
Static Variables
Type | Name | Description | Access |
static float |
| Singleton instance of this class. | Read-Only |
Public Events
Type | Name | Description |
BulletHitEvent |
| Called when the bullet penetrates a surface. |
BulletHitEvent |
| Called when the bullet exits a penetrated surface. |
BulletHitEvent |
| Called when the bullet ricochets off a surface. |
BulletHitEvent |
| Called when the bullet hits a surface, but doesn't penetrate or ricochet. |
BulletHitEvent |
| Called when any type of hit occurs. |
BulletTimeStartEvent |
| Called when bullet time starts. |
BulletTimeUpdateEvent |
| Called continuously when bullet is travelling during bullet time. |
BulletTimeEndEvent |
| Called when bullet finishes it's path to it's target in bullet time. |
BulletTimeEndEvent |
| Called after the timescale and everything is resetted, finalizing bullet time. |
BulletPropertiesEvent |
| Called when a bullet gets activated. |
ZeroDistanceEvent |
| Called when zero distance is cycled. |
Public Methods
Return Type | Name | Signature | Description |
void |
| () | Cycles zero distance up to the next in the m_zeroDistances list. |
void |
| () | Cycles zero distance down to the previous in the m_zeroDistances list. |
void |
| (BulletProperties) | Activates the given bullet properties so that it can be used in the simulation. |
void |
| (BulletProperties, Transform, Transform) | Triggers the system to fire the given bullet properties, simulating it's trajectory, triggering hit & bullet time events etc. |
Last updated