this post was submitted on 28 Jun 2023
15 points (100.0% liked)

Godot

5839 readers
23 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 1 year ago
MODERATORS
 

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
[–] nibblebit 3 points 1 year 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