How to get the Camera2d to follow a player to a certain point

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kingvarric

So I’ve made a Project that is a 2D Platform Jumper. And I want the camera to follow my KinematicBody2D or Sprite and i have gotten the camera to follow the player, but it still does it when he falls off the map. so i was wondering how to limit how far down the camera can go.

:bust_in_silhouette: Reply From: Ertain

Have you tried an Area2D that fires off a signal when the player goes through it? Have it near a pit, and code it so that the camera stops following the player when the player moves through this “Pit” Area2D. Alternatively, you can set properties of the Camera2D for the camera’s limits, e.g. the limit_bottom property.

had to use .set_limit(Margin_Bottom, 640)

kingvarric | 2019-09-03 14:03