state corrections

This commit is contained in:
jshipsey 2020-08-08 17:05:48 -04:00
parent 37c733a067
commit 45971fa403
2 changed files with 5 additions and 2 deletions

View File

@ -87,7 +87,8 @@ impl CharacterBehavior for Data {
},
Climb::Hold => {
// Antigrav
update.vel.0.z = (update.vel.0.z + data.dt.0 * GRAVITY * 1.1).min(CLIMB_SPEED);
update.vel.0.z =
(update.vel.0.z + data.dt.0 * GRAVITY * 1.075).min(CLIMB_SPEED);
update.vel.0 = Lerp::lerp(
update.vel.0,
Vec3::zero(),

View File

@ -24,7 +24,9 @@ impl CharacterBehavior for Data {
update.character = CharacterState::GlideWield;
return update;
}
if data.physics.in_fluid {
update.character = CharacterState::Idle;
}
// If there is a wall in front of character and they are trying to climb go to
// climb
handle_climb(&data, &mut update);