Brutile Posted May 5, 2014 Share 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 Link to comment Share on other sites More sharing options...
alrusdi Posted May 5, 2014 Share Posted May 5, 2014 http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/model/modeladdsurface-r342 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 5, 2014 Share Posted May 5, 2014 Also http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/surface/ Quote Link to comment Share on other sites More sharing options...
Brutile Posted May 5, 2014 Author Share Posted May 5, 2014 Thanks, I'll try it out Quote Link to comment Share on other sites More sharing options...
Brutile Posted May 5, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Josh Posted May 5, 2014 Share 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. Link to comment Share on other sites More sharing options...
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.