From 1c45e9a821c4ab00fe2a1d1551cb7c3a03b232f7 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Feb 2024 00:32:15 -0800 Subject: [PATCH] wip accel code --- src/gameplay_style.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gameplay_style.rs b/src/gameplay_style.rs index 7cb35e8..e70751b 100644 --- a/src/gameplay_style.rs +++ b/src/gameplay_style.rs @@ -228,6 +228,16 @@ pub struct WalkSettings{ surf_dot:Planar64,//surf_dotPlanar64{ + //TODO: fallible walk accel + let diff_len=target_diff.length(); + let friction=if diff_lenPlanar64Vec3{ if control_dir==Planar64Vec3::ZERO{ return control_dir; @@ -263,6 +273,10 @@ pub struct LadderSettings{ dot:Planar64, } impl LadderSettings{ + pub fn accel(&self,target_diff:Planar64Vec3,gravity:Planar64Vec3)->Planar64{ + //TODO: fallible ladder accel + self.accelerate.accel + } pub fn get_ladder_target_velocity(&self,mut control_dir:Planar64Vec3,normal:Planar64Vec3)->Planar64Vec3{ if control_dir==Planar64Vec3::ZERO{ return control_dir;