MexSource Posted December 5, 2013 Share Posted December 5, 2013 Hello Community, I would like to create decals where i 'shoot' with mouse 1. But I only found: http://www.leadwerks.com/wiki/index.php?title=CreateDecal but there is no example for C++ and no syntax Anyone got a solution -Mex Quote C++ :3 Link to comment Share on other sites More sharing options...
gamecreator Posted December 5, 2013 Share Posted December 5, 2013 Odd, I see a C++ example. Pasted from the wiki (and note that this is for Leadwerks 2): TPick _Picked; CameraPick( &_Picked, Camera ( framework camera here ), Vec3(GraphicsWidth() / 2, GraphicsHeight() / 2, 100), 0); TMesh _Decal = CreateDecal(_Picked.surface, TFormPoint(Vec3(_Picked.X, _Picked.Y, _Picked.Z), NULL, _Picked.entity), 20.0/16.0, 32); EntityParent(_Decal , _Picked.entity, 0); PaintEntity(_Decal , LoadMaterial("abstract::bullethole.mat")); AddMesh(_Decal , _Picked.entity); My bigger concern was not finding an example for Leadwerks 3. Also, since you're not a developer I know you have restricted access to the forums but I'm pretty sure there were a few threads out there about it. Quote Link to comment Share on other sites More sharing options...
MexSource Posted December 5, 2013 Author Share Posted December 5, 2013 Nope searched for it but everything the search found, outdated or something similar, 6 threads nothing working :/ Pls help PS: i thougt it was C at the first look (but outdated :/) Quote C++ :3 Link to comment Share on other sites More sharing options...
gamecreator Posted December 5, 2013 Share Posted December 5, 2013 To be clear, which version of Leadwerks are you working with? 2 or 3? Quote Link to comment Share on other sites More sharing options...
MexSource Posted December 5, 2013 Author Share Posted December 5, 2013 3 the trial for the moment Quote C++ :3 Link to comment Share on other sites More sharing options...
MexSource Posted December 5, 2013 Author Share Posted December 5, 2013 Will try this: C++: TMesh Surface::CreateDecal( const TVec3& pos, flt radius, int matrix = 0 ) const (http://www.leadwerks.com/werkspace/page/Documentation/le2/_/command-reference/meshes/createdecal-r305) tomorrow (should have searched better :/) - Mex Quote C++ :3 Link to comment Share on other sites More sharing options...
ZioRed Posted December 6, 2013 Share Posted December 6, 2013 (http://www.leadwerks.com/werkspace/page/Documentation/le2/_/command-reference/meshes/createdecal-r305) Note the link path, it has "le2" so I suppose this documentation is for LE 2.x not for 3.x (and yes LE2 was C, or better it was BlitzMax compiled DLL if I remember well, while the C++ version was just a wrapper around the C functions). We haven't the old T* types, like TMesh in the example posted on that page. I don't find anything about decals and surfaces for Leadwerks 3. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
MexSource Posted December 6, 2013 Author Share Posted December 6, 2013 Hmm you are right 'CreateDecal' isn't a function :/ is there any method to create decals? (Sure C++) Quote C++ :3 Link to comment Share on other sites More sharing options...
beo6 Posted December 6, 2013 Share Posted December 6, 2013 Hello, Decals are not supported currently in LE 3.0. I requested the feature a while ago: http://www.leadwerks.com/werkspace/topic/7130-support-for-decals/ However the megatexture implementation of LE 3.1 should make it possible. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 9, 2013 Share Posted December 9, 2013 A decal entity will be added in the future. This is quite cool as it gets rendered into the gbuffer before the lighting stage, and can effect normals. 3 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...
beo6 Posted December 10, 2013 Share Posted December 10, 2013 You could of course until then create your own decals. The most simple solution would be a plane square that is aligned to the surface of the object that got hit. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 10, 2013 Share Posted December 10, 2013 You could of course until then create your own decals. The most simple solution would be a plane square that is aligned to the surface of the object that got hit. That's what I would recommend for now. It can be easily replaced later and doesn't take much work. 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...
MexSource Posted December 10, 2013 Author Share Posted December 10, 2013 k thanks Quote C++ :3 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.