Realistic Sniper and Ballistics
  • Welcome
  • Introduction
    • Feature List
    • Why/How is it used?
    • Quick Setup
  • Getting Started
    • Getting Started
    • Environment Properties
    • Bullet Properties
    • Object Poolers
    • Sniper and Ballistics System
    • Firing a Bullet
    • Listening to Hit Events
      • Spawning Particles on Hit
      • Hit Tags
    • Zero Distances
    • Wind Vector
    • Air Resistance
    • Spin Drift
    • Ballistic Surfaces - Penetration
    • Ballistic Surfaces - Ricochet
    • Bullet Time Effects
      • Target
      • Bullet
      • Firing with Bullet Time
      • Bullet Time Camera - Default
      • Writing your Own Bullet Time Camera
    • Dynamic Scope System
    • Incorporating Player
      • Player Movement Controller
      • Motion Controller
      • Camera Controller
      • Player With Weapon
    • Mobile Controls
    • Conclusion
  • API
    • API Welcome
    • Sniper and Ballistics System
    • Dynamic Scope System
    • Player Movement Controller
    • Motion Controller
    • Ballistic Surface
    • Environment Properties
    • Ballistics Utility
    • Bullet Time Utility
Powered by GitBook
On this page

Was this helpful?

  1. API

Ballistics Utility

Public Methods

Return Type

Name

Signature

Description

Vector3

GetWindVector

(Vector3, float)

Calculates & returns wind vector in m/s.

Vector3

GetGravity

(float, float)

Calculates & returns a gravity vector.

float

GetKineticEnergy

(Vector3, float)

Calculates & returns a kinetic energy based on velocity & mass.

void

UpdateKEAndVelocity

(ref Vector3, ref float, float, float)

Updates the given kinetic energy to match the new kinetic energy, updates given the velocity accordingly as well.

Vector3

GetDragVector

(Vector3, DragGModel, float, float)

Calculates & returns a drag vector based on velocity, drag model & ballistic coefficient.

Vector3

GetSpinDrift

(ref Vector3, double, float, float)

Calculates & returns a spin drift vector based on previous drift & stability factor.

double

GetStability

(float...)

Calculates & returns stability factor of a bullet based on bullet properties.

double

GetRetardation

(double, double,DragGModel)

Calculates & returns retardation factor based on velocity, ballistic coefficient and drag model.

PreviousEnvironment PropertiesNextBullet Time Utility

Last updated 3 years ago

Was this helpful?