Still need to call Update for draw

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

Just a quick question , do I really need to call Update() in process for drawling a line ?

Cause I tried without update() line can still be drawn, I am just wondering if there is some special purpose to call Update() ?

:bust_in_silhouette: Reply From: volzhs

_draw() is automatically called only once after enter scene tree.
you can see what _draw() draws.
but if you want to update drawing in _draw(), you need to call update() again.

let’s assume that you need a horizontal line at first.
but at some point, you need a vertical line instead of horizontal.
then you need to call update() and draw vertical line in _draw()

Thank you, that makes a lot of sense.

lowpolygon | 2019-06-13 13:45