so i wanted to make it so that when the right arrow key is pressed it moves a sprite to the right, which works but it doesnt as i wanted it to, i wanted it to move smoothly, but it moves pretty jankily.
my code:
func _input(event) if Input.is_action_pressed("Up"): $".".position.y += 1 $Camera2D.position.y += 1
One pixel isn’t very fast so as an example I’ve increased it to 100 pixels per second. You should avoid using $"." instead either use self or nothing at all, the script will know position means self.position