I’m doing some cosmic level sizing and when I try and zoom the camera in or out is is limited(both the editor cam and the in-game cam, though the in-game cam has a much wider range), is there a way to get around these limits?
it’s difficult to show but basically when I zoom out far enough it stops being able to zoom that far, and vice versa for zooming in(like I mentioned this happens in the editor as well which I don’t know how to control)
As for in-game, I control the camera zoom by simply multiplying the zoom by an increment like 0.5, 0.75, 1.5, 2, etc.
the function I use for cam movement looks like this tho:
func changeZoom(incr):
var mouse_pos = get_global_mouse_position()
zoom *= incr
var new_mouse_pos = get_global_mouse_position()
position += mouse_pos - new_mouse_pos
And the scene structure, each sprite is 100x smaller than its parent, so last sprite is 100 000 000x smaller than the original one and I can zoom into him just fine.
For huge scales it’s important to remember that the computer only stores 32bits of information for numbers, each X Y Z position is represented in a float with only 4 billion possible values, furthermore these values are mapped to strange range that favors smaller numbers but extends past 4 billion in large steps.
You could re-compile/upgrade Godot to use doubles which store 64bits for each position. This takes more memory and can be less performant, so it may be better to limit your remap “cosmic” scale, if two planets would be billions of meters away then represent a million meters as one pixel and one unit.