Grapple effects & particles & stuff :)
This commit is contained in:
parent
c290b1ce72
commit
421220e763
13 changed files with 203 additions and 61 deletions
|
@ -2,9 +2,13 @@ extends Camera2D
|
|||
|
||||
@onready var player = $"../"
|
||||
|
||||
var speedMod = 0
|
||||
|
||||
func _process(delta):
|
||||
var velocModifier = clamp(abs(player.velocity.x) - 700, 0, 1000)
|
||||
var direction = clamp(player.velocity.x, -1, 1)
|
||||
|
||||
speedMod = lerpf(speedMod, velocModifier * direction / 10, delta * 20)
|
||||
|
||||
position = (get_local_mouse_position() / 3)
|
||||
position.x += velocModifier * direction / 10
|
||||
position.x += speedMod
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
[node name="Camera" type="Camera2D"]
|
||||
zoom = Vector2(3, 3)
|
||||
position_smoothing_enabled = true
|
||||
position_smoothing_speed = 35.0
|
||||
position_smoothing_speed = 1.0
|
||||
script = ExtResource("1_5yyqm")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue