Brutile Posted May 5, 2014 Posted May 5, 2014 Is it possible to create geometry in a script at runtime? I'm looking to convert a voxel engine (Minecraft terrain) I made in Unity3d to Leadwerks, but I don't know what can and can't be done in Lua. I need to be able to create a mesh using polygons (not just creating cubes). Can this be done? and if so, how? Quote
alrusdi Posted May 5, 2014 Posted May 5, 2014 http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/model/modeladdsurface-r342 1 Quote
gamecreator Posted May 5, 2014 Posted May 5, 2014 Also http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/surface/ Quote
Brutile Posted May 5, 2014 Author Posted May 5, 2014 I'm getting a script error with the surface:UpdateAABB(). I've also tried surface:Update() and surface:Update(true) but I get the error: "attempt to call method 'Update' (a nil value)'. and It doesn't update the colour of the model. Any ideas? Quote
Josh Posted May 5, 2014 Posted May 5, 2014 You are right. The command is not exposed to Lua. Let me fix that tomorrow...if you switch to the beta branch on Steam you can get the update right away. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.