GrappleTest/Player/Camera/CameraController.gd
Bingus_Violet 13ccecad19 fun
2024-02-26 08:28:11 -06:00

11 lines
278 B
GDScript

extends Camera2D
@onready var player = $"../"
func _process(delta):
var velocModifier = clamp(abs(player.velocity.x) - 700, 0, 1000)
var direction = clamp(player.velocity.x, -1, 1)
position = (get_local_mouse_position() / 3)
position.x += velocModifier * direction / 10