Third Person Cover Shooter  1.6
CoverShooter.GrenadePath Class Reference

Contains functions used for grenade path calculation. More...

Static Public Member Functions

static Vector3 Origin (CharacterMotor motor, float lookAngle)
 Calculates point of grenade path origin for the given character. More...
 
static void Step (ref Vector3 position, ref Vector3 velocity, float step, float gravity, float bounciness)
 Moves the grenade by a single step (one game update cycle) More...
 
static int Calculate (Vector3 start, float horizontalAngle, float angleInDegrees, float velocity, GrenadeDescription desc, Vector3[] buffer, float step=0.05f)
 Calculates grenade position for every frame and stores it inside the buffer. More...
 
static Vector3 GetVelocity (Vector3 start, Vector3 target, float maxVelocity, float gravity)
 Calculates required throw velocity in order for the grenade to reach the target. More...
 
static int Calculate (Vector3 start, Vector3 target, float maxVelocity, GrenadeDescription desc, Vector3[] buffer, float step=0.05f)
 Calculates grenade position for every frame and stores it inside the buffer. More...
 
static int Calculate (Vector3 start, Vector3 target, Vector3[] buffer, float step=0.05f)
 Calculates grenade position for every frame and stores it inside the buffer. More...
 

Detailed Description

Contains functions used for grenade path calculation.

Member Function Documentation

◆ Calculate() [1/3]

static int CoverShooter.GrenadePath.Calculate ( Vector3  start,
float  horizontalAngle,
float  angleInDegrees,
float  velocity,
GrenadeDescription  desc,
Vector3 []  buffer,
float  step = 0.05f 
)
static

Calculates grenade position for every frame and stores it inside the buffer.

Returns number of positions calculated.

◆ Calculate() [2/3]

static int CoverShooter.GrenadePath.Calculate ( Vector3  start,
Vector3  target,
float  maxVelocity,
GrenadeDescription  desc,
Vector3 []  buffer,
float  step = 0.05f 
)
static

Calculates grenade position for every frame and stores it inside the buffer.

Returns number of positions calculated.

◆ Calculate() [3/3]

static int CoverShooter.GrenadePath.Calculate ( Vector3  start,
Vector3  target,
Vector3 []  buffer,
float  step = 0.05f 
)
static

Calculates grenade position for every frame and stores it inside the buffer.

Returns number of positions calculated.

◆ GetVelocity()

static Vector3 CoverShooter.GrenadePath.GetVelocity ( Vector3  start,
Vector3  target,
float  maxVelocity,
float  gravity 
)
static

Calculates required throw velocity in order for the grenade to reach the target.

◆ Origin()

static Vector3 CoverShooter.GrenadePath.Origin ( CharacterMotor  motor,
float  lookAngle 
)
static

Calculates point of grenade path origin for the given character.

◆ Step()

static void CoverShooter.GrenadePath.Step ( ref Vector3  position,
ref Vector3  velocity,
float  step,
float  gravity,
float  bounciness 
)
static

Moves the grenade by a single step (one game update cycle)


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