slight changes
This commit is contained in:
parent
e62e15b7e5
commit
e07cb2ff2f
1 changed files with 4 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ fn apply_gravity(
|
|||
|
||||
for (character_controller, mut linear_velocity) in &mut controllers {
|
||||
|
||||
let fall_acceleration: Vec3 = get_lateral_acceleration(character_controller, delta_time, linear_velocity.0);
|
||||
let mut fall_acceleration: Vec3 = get_lateral_acceleration(character_controller, delta_time, linear_velocity.0);
|
||||
fall_acceleration.y = 0.0;
|
||||
let has_limited_air_control: bool = false;
|
||||
|
||||
|
|
@ -226,6 +226,9 @@ fn move_character(
|
|||
character_transform,
|
||||
) in &mut query
|
||||
{
|
||||
character_controller.friction = f32::max(0.0f, character_controller.friction);
|
||||
let forward = character_transform.forward().xyz().normalize();
|
||||
|
||||
match event {
|
||||
MovementAction::Move(direction) => {
|
||||
if is_grounded {
|
||||
|
|
|
|||
Loading…
Reference in a new issue