]> purplebirdman git - frog-ninja.git/blobdiff - asset/character/model/state/moving_state.gd
Squashed commit of the following:
[frog-ninja.git] / asset / character / model / state / moving_state.gd
index accd96ea1c5b958c24751f908c8b2805dc92d5b2..b62532f6232aac6fee48a1a629233ef52866c556 100644 (file)
@@ -23,7 +23,7 @@ func update_skin(delta: float):
        player.model.global_rotation.y = lerp_angle(
                player.model.global_rotation.y,
                skin_target_angle,
        player.model.global_rotation.y = lerp_angle(
                player.model.global_rotation.y,
                skin_target_angle,
-               PlayerVariables.rotation_speed * delta
+               player.rotation_speed * delta
        )
        
        # lean into player momentum just a little bit
        )
        
        # lean into player momentum just a little bit
@@ -35,7 +35,7 @@ func update_skin(delta: float):
                                ) * player.velocity.length() * 0.08, 
                        -skin_lean_limit, skin_lean_limit
                        ),
                                ) * player.velocity.length() * 0.08, 
                        -skin_lean_limit, skin_lean_limit
                        ),
-               PlayerVariables.rotation_speed * delta * 0.25
+               player.rotation_speed * delta * 0.25
                )
 
 
                )
 
 
@@ -47,7 +47,7 @@ func get_new_velocity_from_input(input: InputPacket, delta: float, speed: float)
                )
 
        # save off last movement direction 
                )
 
        # save off last movement direction 
-       if movement_vector.length() > 0.2:
+       if movement_vector.length() > 0.01:
                player.last_movement_vector = movement_vector
        
        # if we're not stuck, then it's okay to set the velocity
                player.last_movement_vector = movement_vector
        
        # if we're not stuck, then it's okay to set the velocity
@@ -55,7 +55,7 @@ func get_new_velocity_from_input(input: InputPacket, delta: float, speed: float)
        player.ground_slope_input = (PI / 2) - player.velocity.angle_to(player.floor_normal)
        var new_velocity = player.velocity.move_toward(
                movement_vector * (speed + player.ground_slope_input * speed),
        player.ground_slope_input = (PI / 2) - player.velocity.angle_to(player.floor_normal)
        var new_velocity = player.velocity.move_toward(
                movement_vector * (speed + player.ground_slope_input * speed),
-               PlayerVariables.acceleration * delta
+               player.acceleration * delta
                )
        
        return new_velocity
                )
        
        return new_velocity