
Following this thread I managed to make them render in the background, however now all the GUIs elements get drawn behind the other elements. One problem that I’m currently facing is that (for what I understand) the GUIs are rendered in front of all the other elements. Gui.animate(root, gui.PROP_ROTATION, vmath.vector3(0, 0, 360), gui.EASING_LINEAR, 30, 0, nil, gui.PLAYBACK_LOOP_FORWARD) - start animation Gui.animate(root, gui.PROP_ROTATION, vmath.vector3(0, 0, -360), gui.EASING_LINEAR, 60, 0, nil, gui.PLAYBACK_LOOP_FORWARD) - start animation Gui.set_rotation(node, vmath.vector3(0, 0, i*2*rays_deg)) local function generate_rays(node_prot, n_rays, alpha) I’m currently trying solution and it seems to work pretty well, the rays can be generated dynamically. What approach would you choose to solve this “problem”? I’m still in the Gideros-way of thinking and I really want to open my mind the new possibilities Defold offers.
#Gideros documentation how to#

(Works but it’s not memory efficient and the number of rays can’t be changed) Use a pre-rendered image of the rays and just rotate it in a script.In Defold I attempted the following “implementations” (from the “worst” to the ideally best): Local val2Y=self.radius*math.sin(current2Degrees) Local val2X=self.radius*s(current2Degrees) Local val1Y=self.radius*math.sin(current1Degrees) Local val1X=self.radius*s(current1Degrees) Local current2Degrees=math.rad((i+1)*greesPerRay/2) Local current1Degrees=math.rad(i*greesPerRay/2) Then a timer would take care of the rotation.

The way I did in Gideros was to create a class GraphicRays and then generate N shapes with some simple math (not the most efficient nor best way, but it works nicely).

Nothing fancy, just some shapes rotating clockwise and counterclockwise.
