From 865c086f14e759f7502c3750152b07a508f89869 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Feb 2024 02:48:49 -0800 Subject: [PATCH] actually implement this function --- src/physics.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/physics.rs b/src/physics.rs index a21d5bf..0661365 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -491,17 +491,23 @@ impl MoveState{ //clip according to contacts touching.constrain_acceleration(models,hitbox_mesh,&mut a); //something + set_acceleration(body,touching,models,hitbox_mesh,a); }, MoveState::Water=>(), MoveState::Fly=>{ //set velocity according to current control state + let mut v=style.get_propulsion_control_dir(camera,input_state.controls)*80; //clip velocity according to current touching state + touching.constrain_velocity(models,hitbox_mesh,&mut v); //apply to body + set_velocity(body,touching,models,hitbox_mesh,v); }, MoveState::Walk(walk_state) |MoveState::Ladder(walk_state) =>{ //accelerate towards walk target or do nothing + let a=walk_state.target.acceleration(); + set_acceleration(body,touching,models,hitbox_mesh,a); }, } }