Polygon Surface
2 posts • Page 1 of 1
Polygon Surface
How does the surface system work when spawning a polygon? 
-

Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: Polygon Surface
You mean "surfaces" data? It's a list of sub-polygons where each sub-polygon is list of points.
For example if you need to spawn box with triangle hole in the middle you need that surfaces:
[[box],[triangle]]
[[[0,1],[1,1],[1,0],[0,0]], [[0.1, 0.1], [0.9, 0.1], [0.5, 0.9]]]
For example if you need to spawn box with triangle hole in the middle you need that surfaces:
[[box],[triangle]]
[[[0,1],[1,1],[1,0],[0,0]], [[0.1, 0.1], [0.9, 0.1], [0.5, 0.9]]]
- Code: Select all
scene.addPolygon {surfaces := [[[0,1],[1,1],[1,0],[0,0]], [[0.1, 0.1], [0.9, 0.1], [0.5, 0.9]]]}
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests




