Are there any pointers or resources you can give me to start out that can point me to the right direction to learn GDScript? I have no experience in coding in general and I’m looking to get started with Godot and using GDScript. Thank you.

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 3 years ago

This script will rotate a MeshInstance2D node clockwise on the screen:

extends MeshInstance2D

var rotation_speed: float = 1.0

func _process(delta: float) -> void:
	rotate(delta * rotation_speed)
  • Create a new scene
  • add a MeshInstance2d
  • set it's Mesh parameter on the right to new BoxMesh
  • scale it and put it in the middle of the screen
  • add this script to it
  • press play

If you've figured out to do the above correctly, you will see a box spinning clockwise on your screen.

Now figure out how spin it counter-clockwise

After that see if you can figure out how to move it to the left. Then see if you can move it back and forth.

Congratulations! You've started :D

  • source