Godot 4.0 update() command in _process

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By StrictPossum

Hi.
I am trying to draw a circle and update the position.
In Godot 3.5 I use the update() command. But when I tried it in Godot 4.0 Beta it told me the command was not found.

Is there another command that replaced update() in Godot 4.0?

==============================================================

extends Node2D

var cen = Vector2(200,200)

func _process(delta):

if Input.is_action_pressed("ui_right"):
	cen.x=cen.x+1
	update()  #works with 3.5 but not 4.0

func _draw():
var rad = 40
var col = Color(1,0,0)
draw_circle(cen,rad,col)

:bust_in_silhouette: Reply From: Calinou

CanvasItem’s update() was renamed to queue_redraw() in 4.0.

Awesome. Thanks

StrictPossum | 2022-10-07 19:51

Truly! This helps me!

AlanLuiz | 2022-10-13 18:15