Polygon Creator lets you create simple polygons (no intersecting lines) for use with physics and vertex buffers.
It comes with 2 rooms:
a simple editor which can copy what you've created to your clipboard for use in your game
a demo scene of a concave fixture with physics.
The process of creating a fixture/vertex buffer is as follows:
Your start contains a path, a list of points (pairs of x,y coordinates), or a list of instance references that you'll be triangulating.
The next step is to convert these 3 possible inputs into a list containing points using the included scripts (2. input (points) is already in this format).
After retrieving these points, you call the triangulation script which can either give you the result instantly or through multiple step cycles, depending on the performance you want. The latter is better when you can afford the triangulation process over the course of a few steps, before the actual mesh is required for use.
When you have the list of triangles, you can convert it to fixtures or a vertex buffer.
Note: points must be defined in clockwise orientation.
The project comes a few premade scripts for some types of conversions. All scripts and code used for general purpose is commented, but knowledge in lists (data structures) and vertex buffers is required.
Version 1.0.2. Published July 24, 2017
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
No reviews have been left for this asset - be the first!