Godot 4 gotchas whe...
 
Notifications
Clear all

Godot 4 gotchas when you are following a Godot 3 tutorial

1 Posts
1 Users
0 Reactions
71 Views
Posts: 17
Apprentice
Topic starter
(@gamedesigners)
Apprentice
Joined: 3 months ago
[#3]

Most Godot tutorials online are still Godot 3, and the API moved enough between versions that following one in Godot 4 produces confusing errors.

The changes that trip people up most:

  • KinematicBody2D is now CharacterBody2D, and move_and_slide() takes no arguments — set velocity first
  • yield became await
  • export var x became @export var x
  • onready became @onready
  • Tweens are objects now — create_tween() instead of a Tween node
  • instance() became instantiate()

If a tutorial's code will not compile, check the upload date first. Anything before 2023 is almost certainly Godot 3.


Share:
Scroll to Top