I Have A Player And Camera In 1 Scene And Enemy In Other Scene And I Want Camera Maintain View For Both Player And Enemy By Going Close Or Away make sure both are in the center of camera so both will be seeable in camera view no matter how much zoom you have to do And Also DON"T USE DISTANCE USE CAMERA VIEW TO CHECK IS PLAYER And Enemy Is Camera View Or Not If In View Then Zoom in And Max Zoom Is Only This camera.position = Vector3(-2, 0, -2) And If Not In View Then Zoom and There Is No Limit For Zoom Out Do Zoom Out Until Both Player And Enemy Is In Camera's View in Godot 4.3 And In 3D
#Maintain View
1 messages · Page 1 of 1 (latest)
calculate the distance between player.global_position and enemy.global_postion and based on that increase and decrease camera.magnitude