![]() |
|
Polygon Help needed - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Starfall (https://teamscm.co.uk/forum-7.html) +--- Thread: Polygon Help needed (/thread-1469.html) |
Polygon Help needed - Destiny's Player - 08-12-2015 Basically, I need to somehow make a function which would automatically create a polygon and an outline of lines around it. Here's what I have so far.
And I can't figure out, what to do to actually make it work. Mostly, I can't figure out how to make the polygon work... Can you even compose a polygon in multiple steps? ptable can be input in any way possible, right now I'm thinking about having tables within tables with both x and y in each slot. RE: Polygon Help needed - Person8880 - 08-12-2015 Well first of all, render.createPoly is not something you need to or should be using. It's a leftover from old and bad code that was over paranoid with polygons. All you need for a polygon is a table like this:
Compose it however you want. If you want lines to go around the outside, then you just have to connect the dots between your polygon vertices. RE: Polygon Help needed - Destiny's Player - 08-12-2015 Thanks! I was not aware of that. It all works now, just finished replacing all of my previous mess with that lone function. |