New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

Tessellation algorithm to create 1 or more cutout holes on a surface?

Asked by 1 year ago
Edited 1 year ago

I've been trying to come up with a way to create a rectangular hole within another rectangle or square surface and that the hole can be rotated and placed anywhere within the surface. Obviously the current idea is to use triangles, but I'm not exactly sure how to decide which triangles connect from which surface corner to the cutout corners without having the triangles overlapping the hole itself.

I already know how to generate polygons from coordinates, and I did figure out a working algorithm to create 1 hole on the surface, however I still am having trouble for creating two holes.

Something like this, where the red rectangles is the hole: !enter image description here

EDIT: I am also aware that roblox realtime CSG is now a thing, however I cannot use it because of the yielding and that it's server-side only.

where is the red square Fad99 278 — 1y
Haha yes, if that can work during runtime on the client's end, it'd be perfect for what I need. ShoesForClues 0 — 1y

Answer this question