Hello again Godot Community. I kinda have a new issue here you see I'm trying to make a level/map (of course) and obviously been using Camera2D. But I'm unable to set room limits for my level. Such as 1 part if the level is 1 rooms worth (i.e the default screen size) then the next room is 2 rooms worth (the default screen size * 2). (etc. etc.)
Here's what I used for the Camera Limit.
However the real issue is that my TransitionTween that I used doesn't work with the previous.
extends Node2D
onready var ViewSize: Vector2 = get_viewport().get_visible_rect().size
var tweening: bool = false
func _ready():
Event.connect("transition", self, "on_transition")
Area2D
func on_transition(dir: Vector2, body, ShapeSize: Vector2):
$Tween.interpolate_property(self, "global_position", global_position, (global_position + (ViewSize * dir)) , 1, Tween.TRANS_LINEAR, Tween.EASE_IN, 0)
$Tween.start()
$Tween.interpolate_property(body, "global_position", body.global_position, (body.global_position + (ShapeSize * 2 * dir)) , 1, Tween.TRANS_LINEAR, Tween.EASE_IN, 0)
tweening = true
func _on_Tween_tween_all_completed():
tweening = false
Please help