Page 1 of 1

LuaRendering.draw_polygon - confusing vertices description

Posted: Sun Apr 26, 2020 12:59 pm
by moon69
From LuaRendering.draw_polygon...
vertices :: array of ScriptRenderTarget:
target :: Position or LuaEntity
target_offset :: Vector (optional): Only used if target is a LuaEntity.
but 'vertices' doesn't seem to take ScriptRenderTargets! To be fair, the ScriptRenderTarget in the above code is plain text (ie: not linked), but still confusing!

It worked for me with something like:

Code: Select all

vertices = { {target={1,2}}, {target={3,4}}, {target={5,6}}, ...}

Re: LuaRendering.draw_polygon - confusing vertices description

Posted: Mon Apr 27, 2020 10:51 am
by Bilka
Does this solve the problem for you?
Image

If not, could you try to explain what exactly is confusing with the description/what information you are missing?

Re: LuaRendering.draw_polygon - confusing vertices description

Posted: Fri May 01, 2020 12:45 pm
by moon69
Thanks Bilka,

I think the confusion was because I've become used to most things like ScriptRenderTarget having a reference on the Concepts page - often with extra explanation or examples.

So it's much better that CustomScriptRenderTarget avoids confusion with ScriptRenderTarget as you show, but I suspect in x months time I'll be wondering why CustomScriptRenderTarget isn't clickable (my memory being somewhat... non-deterministic!).