We will add the ability to move the camera
Add new actions to the Input Map
We will use two Node3D nodes
One to stabalise left and right
One to stabalise up and down
First step is to:
REMOVE Camera3D node from the Hole scene
Create a new scene with Node3D as root
Add another Node3D as child
Add a Camera3D as a child
Offset the position of the Camera3D
This moves it back, looking toward the origin
Add a script to the CameraGimbal
Add variables for
camera speed
zoom speed
minimum zoom
Maximum zoom
Create the input function
Add an instance of the CameraGimbal
Update the process function of
To make the gimbal follow the ball
Play Test The Game - Use mouse wheel to zoom in and out, WASD to move the camera
When the ball falls into the hole
The game should load the next one
Add an export var to the hole script
Now you can drag the next hole scene in the Inspector!
Add the scene loading code