Jump to content

bullet holes (decals)?


MexSource
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...