Complete guide to Godot's default variables, functions, and methods
No separate declaration required - ready to use!
Try different keywords or clear your search
velocity = Vector2(300, 0)move_and_slide()if is_on_floor(): jump()get_tree().quit()add_child(enemy)queue_free()add_to_group("enemies")get_node("Player")position = Vector2(100, 200)look_at(player.position)if Input.is_action_pressed("jump"):var dir = Input.get_axis("left", "right")health = clamp(health, 0, 100)pos = lerp(start, end, 0.5)print("Hello, World!")extends CharacterBody2D
const SPEED = 300.0
const JUMP_VELOCITY = -400.0
func _physics_process(delta):
# Gravity
if not is_on_floor():
velocity.y += get_gravity().y * delta
# Jump
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Movement
var direction = Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
move_and_slide()
This covers the most commonly used built-in properties and methods. All of these are available without any import or declaration!