10 lines
278 B
GDScript
10 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
|