diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 21d9296172..4ac88ee978 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -16,6 +16,7 @@ pub mod theropod; use crate::{ assets::{self, Asset}, + comp::Collider, consts::{HUMAN_DENSITY, WATER_DENSITY}, make_case_elim, npc::NpcKind, @@ -399,6 +400,14 @@ impl Body { pub fn height(&self) -> f32 { self.dimensions().z } + pub fn collider_shape(&self) -> Collider { + Collider::Box { + radius: self.radius(), + z_min: 0.0, + z_max: self.height(), + } + } + pub fn base_energy(&self) -> u32 { match self { Body::BipedLarge(biped_large) => match biped_large.species {