Disable Camera2D limit?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mateusak
:warning: Old Version Published before Godot 3 was released.

First of all, I’m using a Camera2D to center my player. I’m not sure if that’s its correct use, so if I should be using something else, tell me. But if I’m right, how can I disable Camera2D limit?

:bust_in_silhouette: Reply From: Zylann

What do you mean by centering the player? If you mean seeing it at the center of the screen, it’s Ok to put the camera as child of the player, I do that myself and it works well.

I don’t see a parameter to disable the limit, so I have it set to insanely high numbers such as -10000000 and 10000000 (which is the defaults I think).

the upper limit is 1215752192 as of godot 4.0, 32bit int limit or something. it is valid even if you put it in an actor that moves. but whatever game you are making, you will never use it all. So unless you making minecraft clone or something like this you shoud be fine.

Nothead | 2023-07-05 14:49