How to move a custom shape without redrawing?

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

The players in my game are represented by a custom-drawn hexagon. The shape only needs to be drawn once, but obviously it needs to be able to move around the map. But I haven’t been able to figure out how to move it without calling update() every frame and redoing all the work. Is there a way to do this?

As a bonus question, when drawing the hexagons the lines don’t smoothly connect at the end. Is there a way to fix that?

:bust_in_silhouette: Reply From: kidscancode

Drawing is a done on 2D nodes. You can draw on the node, then move the node around by changing its position.

Sure enough, it’s working. I swear I already tried this before and it didn’t work. I must not have been multiplying it correctly.

Thanks!

tanders12 | 2023-01-21 21:10