![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | undead_rat |
I’m new to godot, so I really may of just made a dumb mistake, but func _physics_process(delta): isn’t running. It was yesterday, but after making some changes it’s stopped.
func _physics_process(delta):
print("Hello world")
velocity.x = 0
velocity.y = 0
if Input.is_action_pressed("move_left"):
velocity.x -= speed * acceleration * delta
sprite.flip_h = true
if Input.is_action_pressed("move_right"):
velocity.x += speed * acceleration * delta
sprite.flip_h = false
if Input.is_action_pressed("move_down"):
velocity.y += speed * acceleration * delta
if Input.is_action_pressed("move_up"):
velocity.y -= speed * acceleration * delta
velocity = move_and_slide(velocity, Vector2.UP)
Theres no output, including from “Hello world”, and the sprite is no longer moving. No errors are being thrown up by the debugger, so I’m not sure what the issue could be. Any ideas?
Please fix the formatting of your code for the forum. While it’s mostly right, the function name itself is misformatted.
jgodfrey | 2022-08-27 21:55