Newbie - unable to get a simple 3D animation running

Godot Version

v4.2.2 - running on Mac OS Sonoma - MacBook Pro 14" M3

Question

I created a cube and tried to make it rotate using a simple GDScript, but all I get is an empty debug window. Possibly I am missing a setting but there is no indication about what is wrong.

Here is the simple script (copied from a tutorial on YouTube)

extends MeshInstance3D #this is my 3D cube
@export var speed:float = 5;

Called when the node enters the scene tree for the first time.

func _ready():
pass # Replace with function body.

Called every frame. ‘delta’ is the elapsed time since the previous frame.

func _process(delta):
rotate_y(speed * delta)

Does your scene have a camera and a light (directional light for example)?

To quickly add environment and light to a scene you can use the 3 dots icon on the upper menu bar and then click add sun/add environment to scene.

To align the camera quickly, select your camera, click on the Perspektive button and chose align transform with view (The shortcut CTRL+Alt+M never worked for me…)

Without any camera you won’t see anything. Without light everything would be just black.

2 Likes

Thanks for this insight. Being a total newbie, this was not obvious to me, also as I was following a YouTube tutorial step by step - but there seems to be something missing as all I am getting is an empty DEBUG window. I will find a local Godot user to go over my installation and check if all required components are there before continuing on my journey.