Skip to content

Instantly share code, notes, and snippets.

@lamarmarshall
Created March 8, 2025 02:39
Show Gist options
  • Save lamarmarshall/f8800d029b02168f36a0de70218277f5 to your computer and use it in GitHub Desktop.
Save lamarmarshall/f8800d029b02168f36a0de70218277f5 to your computer and use it in GitHub Desktop.
godot, rpg movement
extends CharacterBody2D
var speed: int = 250
func _process(delta: float) -> void:
player_movement()
func player_movement() -> void:
velocity = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
velocity = velocity.normalized() * speed
move_and_slide()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment