-
Notifications
You must be signed in to change notification settings - Fork 1
Kamera und Zoom
SamToorchi edited this page Feb 10, 2020
·
1 revision
- Camera2D
- Area2D
- CollisionShape2D (80,64)
- Area2D
- Die Kameraposition ändern: Area2D --> Transform --> Position (80,80)
- Die Kameraszene in der Hauptszene einbetten
- Kameraeinstellungen --> Current aktivieren
- Anchor mode --> Drag Center
extends Camera2D
func _process(delta):
var pos = get_node("../player").global_position
var x = floor(pos.x) - 16
var y = floor(pos.y) - 16
global_position = lerp(global_position, Vector2(x,y), 0.1)