mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Modify humanoid dimensions for calculation of drag
This commit is contained in:
parent
b1a2b21900
commit
8ba1b16982
@ -184,13 +184,15 @@ impl Body {
|
|||||||
/// Skin friction is the drag arising from the shear forces between a fluid
|
/// Skin friction is the drag arising from the shear forces between a fluid
|
||||||
/// and a surface, while pressure drag is due to flow separation. Both are
|
/// and a surface, while pressure drag is due to flow separation. Both are
|
||||||
/// viscous effects.
|
/// viscous effects.
|
||||||
|
///
|
||||||
|
/// This coefficient includes the reference area.
|
||||||
fn parasite_drag_coefficient(&self, wings: Option<&Wings>) -> f32 {
|
fn parasite_drag_coefficient(&self, wings: Option<&Wings>) -> f32 {
|
||||||
// Reference area and drag coefficient assumes best-case scenario of the
|
// Reference area and drag coefficient assumes best-case scenario of the
|
||||||
// orientation producing least amount of drag
|
// orientation producing least amount of drag
|
||||||
match self {
|
match self {
|
||||||
// Cross-section, head/feet first
|
// Cross-section, head/feet first
|
||||||
Body::BipedLarge(_) | Body::BipedSmall(_) | Body::Golem(_) | Body::Humanoid(_) => {
|
Body::BipedLarge(_) | Body::BipedSmall(_) | Body::Golem(_) | Body::Humanoid(_) => {
|
||||||
let dim = self.dimensions().xy().map(|a| a * 0.5);
|
let dim = self.dimensions().xy().map(|a| 0.7 * a * 0.5);
|
||||||
const CD: f32 = 0.7;
|
const CD: f32 = 0.7;
|
||||||
CD * PI * dim.x * dim.y
|
CD * PI * dim.x * dim.y
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user