minor tweaks from last
This commit is contained in:
@@ -245,12 +245,7 @@ func weapon_sway(delta):
|
||||
mouse_input = lerp(mouse_input, Vector2.ZERO, 10 * delta)
|
||||
weapon_holder.rotation.x = lerp(weapon_holder.rotation.x, mouse_input.y * weapon_rotation_amount, 5 * delta)
|
||||
weapon_holder.rotation.y = lerp(weapon_holder.rotation.y, mouse_input.x * weapon_rotation_amount, 5 * delta)
|
||||
|
||||
#crosshair.position.x = lerp(crosshair.position.x, mouse_input.x * 100, 2 * delta)
|
||||
|
||||
#crosshair.size.x = lerp(crosshair.size.x, clamp((abs(mouse_input.x * 10) + abs(mouse_input.y) * 1000),0.0,100.0), 1 * delta)
|
||||
#crosshair.size.y = lerp(crosshair.size.y, clamp((abs(mouse_input.x * 10) + abs(mouse_input.y) * 1000),0.0,100.0), 1 * delta)
|
||||
|
||||
|
||||
func weapon_bob(vel : float, delta):
|
||||
if weapon_holder:
|
||||
if vel > 2 and is_on_floor():
|
||||
@@ -261,3 +256,7 @@ func weapon_bob(vel : float, delta):
|
||||
else:
|
||||
weapon_holder.position.y = lerp(weapon_holder.position.y, def_weapon_holder_pos.y, .1 * delta)
|
||||
weapon_holder.position.x = lerp(weapon_holder.position.x, def_weapon_holder_pos.x, .1 * delta)
|
||||
|
||||
func weapon_recoil(delta):
|
||||
var recoil_to = camera.rotation.x + gun.recoil_amount
|
||||
camera.rotation.x = clamp(lerp(camera.rotation.x,recoil_to, delta * 10), deg_to_rad(-90), deg_to_rad(60))
|
||||
|
||||
Reference in New Issue
Block a user