Page 1 of 1

[2.0.73] LuaRenderObject::players writing empty table yields visible renderobject

Posted: Tue Feb 03, 2026 11:16 pm
by blueblue
When you set the players that can see the object to empty the object should be invisible. Same with forces.

Reproduce: In a new game, run the command

Code: Select all

/c local line = rendering.draw_line{from = {0,0}, to = game.player.character, color = {}, surface = game.player.surface, width = 4}; line.players = {}
Expected Result: No line should be invisible. Observed result: Line is visible.

Re: [2.0.73] LuaRenderObject::players writing empty table yields visible renderobject

Posted: Wed Feb 04, 2026 12:45 am
by Rseding91
Thanks for the report however this is not a bug. The documentation specifically mentions this is how it works. If you don't want a line to render for any player - set it to visible = false or destroy it and create it at a later time.

Re: [2.0.73] LuaRenderObject::players writing empty table yields visible renderobject

Posted: Thu Feb 05, 2026 12:08 pm
by Bilka
I noticed that this was documented on the various draw_* methods but not LuaRenderObject itself, so I've adjusted the LuaRenderObject documentation for the next release.