Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchTuning::Ball Struct Referencefinal

#include <match_tuning.h>

Static Public Attributes

static constexpr float GRAVITY = 9.81f
 
static constexpr float AIR_DENSITY = 1.225f
 
static constexpr float MASS_KG = 0.43f
 
static constexpr float CROSS_SECTION_M2 = 0.038f
 
static constexpr float DRAG_SUBCRITICAL = 0.45f
 
static constexpr float DRAG_SUPERCRITICAL = 0.24f
 
static constexpr float DRAG_CRISIS_LOW_SPEED = 8.0f
 
static constexpr float DRAG_CRISIS_HIGH_SPEED = 14.0f
 
static constexpr float BOUNCE_RESTITUTION = 0.62f
 
static constexpr float BOUNCE_TANGENTIAL_RETAINED = 0.84f
 
static constexpr float MIN_BOUNCE_SPEED = 1.0f
 
static constexpr float ROLLING_DECELERATION = 0.75f
 
static constexpr float ROLLING_VISCOUS_PER_SECOND = 0.05f
 
static constexpr float CURVE_DECAY_PER_SECOND = 0.35f
 
static constexpr float STOP_SPEED = 0.2f
 
static constexpr float DEAD_SHOT_SPEED = 6.0f
 
static constexpr float MAX_FLIGHT_SECONDS = 6.0f
 
static constexpr float GOALKEEPER_CONTROL_RADIUS_METRES = 1.8f
 
static constexpr float OUTFIELD_CONTROL_RADIUS_METRES = 1.0f
 
static constexpr float CHEST_CONTROL_RADIUS_METRES = 0.7f
 
static constexpr float LOW_BALL_METRES = 0.5f
 
static constexpr float BASE_CONTROL_CHANCE = 0.74f
 
static constexpr float TOUCH_SKILL_BONUS = 0.45f
 
static constexpr float SPEED_CONTROL_PENALTY = 0.0065f
 
static constexpr float MIN_CONTROL_CHANCE = 0.28f
 
static constexpr float MAX_CONTROL_CHANCE = 0.97f
 
static constexpr float INTERCEPT_BASE_CHANCE = 0.62f
 
static constexpr float INTERCEPT_DEFENDING_BONUS = 0.35f
 
static constexpr float INTERCEPT_SPEED_PENALTY = 0.018f
 
static constexpr float INTERCEPT_MIN_CHANCE = 0.08f
 
static constexpr float FAILED_TRAP_TIME = 0.55f
 
static constexpr float FAILED_TOUCH_LOCKOUT = 0.3f
 
static constexpr float HEAVY_TOUCH_RETAINED = 0.25f
 
static constexpr float MIN_HEAVY_TOUCH_SPEED = 1.5f
 
static constexpr float MAX_HEAVY_TOUCH_SPEED = 4.5f
 
static constexpr float BASE_TRAP_TIME = 0.25f
 
static constexpr float TRAP_SKILL_PENALTY = 0.35f
 
static constexpr float MIN_POST_TOUCH_DELAY = 0.5f
 
static constexpr float MAX_POST_TOUCH_DELAY = 0.9f
 
static constexpr float PASSING_TOUCH_WEIGHT = 0.85f
 
static constexpr float KEEPER_FEET_WEIGHT = 0.7f
 
static constexpr float SAVE_DISTANCE_METRES = 1.8f
 
static constexpr float SAVE_DIVE_TIME = 1.2f
 
static constexpr float MIN_KEEPER_HOLD_SECONDS = 2.5f
 
static constexpr float MAX_KEEPER_HOLD_SECONDS = 5.0f
 
static constexpr float GOAL_NET_BALL_DEPTH = 0.02f
 

Detailed Description

Ball physics in SI units: quadratic air drag with a drag crisis, gravity, a restitution bounce, rolling resistance on the grass and curve as a heading rotation (a Magnus-effect stand-in).

Member Data Documentation

◆ AIR_DENSITY

constexpr float MatchTuning::Ball::AIR_DENSITY = 1.225f
staticconstexpr

◆ BASE_CONTROL_CHANCE

constexpr float MatchTuning::Ball::BASE_CONTROL_CHANCE = 0.74f
staticconstexpr

◆ BASE_TRAP_TIME

constexpr float MatchTuning::Ball::BASE_TRAP_TIME = 0.25f
staticconstexpr

◆ BOUNCE_RESTITUTION

constexpr float MatchTuning::Ball::BOUNCE_RESTITUTION = 0.62f
staticconstexpr

◆ BOUNCE_TANGENTIAL_RETAINED

constexpr float MatchTuning::Ball::BOUNCE_TANGENTIAL_RETAINED = 0.84f
staticconstexpr

◆ CHEST_CONTROL_RADIUS_METRES

constexpr float MatchTuning::Ball::CHEST_CONTROL_RADIUS_METRES = 0.7f
staticconstexpr

◆ CROSS_SECTION_M2

constexpr float MatchTuning::Ball::CROSS_SECTION_M2 = 0.038f
staticconstexpr

◆ CURVE_DECAY_PER_SECOND

constexpr float MatchTuning::Ball::CURVE_DECAY_PER_SECOND = 0.35f
staticconstexpr

◆ DEAD_SHOT_SPEED

constexpr float MatchTuning::Ball::DEAD_SHOT_SPEED = 6.0f
staticconstexpr

A spent shot slower than this is a loose ball again.

◆ DRAG_CRISIS_HIGH_SPEED

constexpr float MatchTuning::Ball::DRAG_CRISIS_HIGH_SPEED = 14.0f
staticconstexpr

◆ DRAG_CRISIS_LOW_SPEED

constexpr float MatchTuning::Ball::DRAG_CRISIS_LOW_SPEED = 8.0f
staticconstexpr

◆ DRAG_SUBCRITICAL

constexpr float MatchTuning::Ball::DRAG_SUBCRITICAL = 0.45f
staticconstexpr

◆ DRAG_SUPERCRITICAL

constexpr float MatchTuning::Ball::DRAG_SUPERCRITICAL = 0.24f
staticconstexpr

◆ FAILED_TOUCH_LOCKOUT

constexpr float MatchTuning::Ball::FAILED_TOUCH_LOCKOUT = 0.3f
staticconstexpr

◆ FAILED_TRAP_TIME

constexpr float MatchTuning::Ball::FAILED_TRAP_TIME = 0.55f
staticconstexpr

◆ GOAL_NET_BALL_DEPTH

constexpr float MatchTuning::Ball::GOAL_NET_BALL_DEPTH = 0.02f
staticconstexpr

◆ GOALKEEPER_CONTROL_RADIUS_METRES

constexpr float MatchTuning::Ball::GOALKEEPER_CONTROL_RADIUS_METRES = 1.8f
staticconstexpr

◆ GRAVITY

constexpr float MatchTuning::Ball::GRAVITY = 9.81f
staticconstexpr

◆ HEAVY_TOUCH_RETAINED

constexpr float MatchTuning::Ball::HEAVY_TOUCH_RETAINED = 0.25f
staticconstexpr

◆ INTERCEPT_BASE_CHANCE

constexpr float MatchTuning::Ball::INTERCEPT_BASE_CHANCE = 0.62f
staticconstexpr

◆ INTERCEPT_DEFENDING_BONUS

constexpr float MatchTuning::Ball::INTERCEPT_DEFENDING_BONUS = 0.35f
staticconstexpr

◆ INTERCEPT_MIN_CHANCE

constexpr float MatchTuning::Ball::INTERCEPT_MIN_CHANCE = 0.08f
staticconstexpr

◆ INTERCEPT_SPEED_PENALTY

constexpr float MatchTuning::Ball::INTERCEPT_SPEED_PENALTY = 0.018f
staticconstexpr

◆ KEEPER_FEET_WEIGHT

constexpr float MatchTuning::Ball::KEEPER_FEET_WEIGHT = 0.7f
staticconstexpr

◆ LOW_BALL_METRES

constexpr float MatchTuning::Ball::LOW_BALL_METRES = 0.5f
staticconstexpr

◆ MASS_KG

constexpr float MatchTuning::Ball::MASS_KG = 0.43f
staticconstexpr

◆ MAX_CONTROL_CHANCE

constexpr float MatchTuning::Ball::MAX_CONTROL_CHANCE = 0.97f
staticconstexpr

◆ MAX_FLIGHT_SECONDS

constexpr float MatchTuning::Ball::MAX_FLIGHT_SECONDS = 6.0f
staticconstexpr

◆ MAX_HEAVY_TOUCH_SPEED

constexpr float MatchTuning::Ball::MAX_HEAVY_TOUCH_SPEED = 4.5f
staticconstexpr

◆ MAX_KEEPER_HOLD_SECONDS

constexpr float MatchTuning::Ball::MAX_KEEPER_HOLD_SECONDS = 5.0f
staticconstexpr

◆ MAX_POST_TOUCH_DELAY

constexpr float MatchTuning::Ball::MAX_POST_TOUCH_DELAY = 0.9f
staticconstexpr

◆ MIN_BOUNCE_SPEED

constexpr float MatchTuning::Ball::MIN_BOUNCE_SPEED = 1.0f
staticconstexpr

◆ MIN_CONTROL_CHANCE

constexpr float MatchTuning::Ball::MIN_CONTROL_CHANCE = 0.28f
staticconstexpr

◆ MIN_HEAVY_TOUCH_SPEED

constexpr float MatchTuning::Ball::MIN_HEAVY_TOUCH_SPEED = 1.5f
staticconstexpr

◆ MIN_KEEPER_HOLD_SECONDS

constexpr float MatchTuning::Ball::MIN_KEEPER_HOLD_SECONDS = 2.5f
staticconstexpr

A keeper holding the ball waits for his team to push up.

◆ MIN_POST_TOUCH_DELAY

constexpr float MatchTuning::Ball::MIN_POST_TOUCH_DELAY = 0.5f
staticconstexpr

◆ OUTFIELD_CONTROL_RADIUS_METRES

constexpr float MatchTuning::Ball::OUTFIELD_CONTROL_RADIUS_METRES = 1.0f
staticconstexpr

◆ PASSING_TOUCH_WEIGHT

constexpr float MatchTuning::Ball::PASSING_TOUCH_WEIGHT = 0.85f
staticconstexpr

◆ ROLLING_DECELERATION

constexpr float MatchTuning::Ball::ROLLING_DECELERATION = 0.75f
staticconstexpr

◆ ROLLING_VISCOUS_PER_SECOND

constexpr float MatchTuning::Ball::ROLLING_VISCOUS_PER_SECOND = 0.05f
staticconstexpr

◆ SAVE_DISTANCE_METRES

constexpr float MatchTuning::Ball::SAVE_DISTANCE_METRES = 1.8f
staticconstexpr

◆ SAVE_DIVE_TIME

constexpr float MatchTuning::Ball::SAVE_DIVE_TIME = 1.2f
staticconstexpr

◆ SPEED_CONTROL_PENALTY

constexpr float MatchTuning::Ball::SPEED_CONTROL_PENALTY = 0.0065f
staticconstexpr

◆ STOP_SPEED

constexpr float MatchTuning::Ball::STOP_SPEED = 0.2f
staticconstexpr

◆ TOUCH_SKILL_BONUS

constexpr float MatchTuning::Ball::TOUCH_SKILL_BONUS = 0.45f
staticconstexpr

◆ TRAP_SKILL_PENALTY

constexpr float MatchTuning::Ball::TRAP_SKILL_PENALTY = 0.35f
staticconstexpr

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