Godot Version
godot 4.6
Question
im following the godot docs tutorial for player movement ( Listening to player input — Godot Engine (stable) documentation in English ) but delta time. isnt working I rotate slower when I lower the frame rate
godot 4.6
im following the godot docs tutorial for player movement ( Listening to player input — Godot Engine (stable) documentation in English ) but delta time. isnt working I rotate slower when I lower the frame rate
Sounds like the tutorial is working fine - you are just seeing something you didn’t expect.
no its definitely spinning at different speeds
You need to give a bit more details, E.G:
What’s the script you’re using?
What frame rates have you tested it at?
How can you verify it’s slower?
Can you provide a video?
im using this script
extends Sprite2D
#func _init() -> void:
#print("Wassup?")
var speed = 400
var angular_speed = PI # not sure why this is needed but alr
func _process(delta) -> void:
var direction = 0
if Input.is_action_pressed("ui_left"):
direction = -1
if Input.is_action_pressed("ui_right"):
direction = 1
rotation += angular_speed * direction * delta
var velocity = Vector2(0, 0)
if Input.is_action_pressed("ui_up"):
velocity = Vector2(0, -1).rotated(rotation) * speed
position += velocity * delta