jumped velocity

This commit is contained in:
Quaternions 2024-02-16 21:08:34 -08:00
parent 12907fa4a9
commit d292993c16

View File

@ -206,6 +206,18 @@ pub struct JumpSettings{
//information used to calculate jump behaviour
calculation:JumpCalculation,
}
impl JumpSettings{
pub fn jumped_velocity(&self,style:&StyleModifiers,jump_dir:Planar64Vec3,velocity:Planar64Vec3)->Planar64Vec3{
match self.calculation{
//roblox style
JumpCalculation::Capped=>todo!(),
//something different
JumpCalculation::Energy=>todo!(),
//source style
JumpCalculation::Linear=>velocity+jump_dir*(self.impulse.get_jump_deltav(&style.gravity,style.mass)/jump_dir.length()),
}
}
}
#[derive(Clone)]
pub struct AccelerateSettings{