Game Development Community

Bullet holes (decals) on objects (dts)

by Isidoros · in Torque Game Engine · 12/09/2009 (9:06 am) · 2 replies

I can see bullet holes on the terrain but not at an object such as trees (.dts file). I think that I have read that this is not possible with TorqueScript. Is there any new post about it? I have found this.

UPDATE: Rayford Pomeroy says:
Quote:Actually it works fine in 1.5.2 for me.
However with the stock code it would only work on the terrain and not on objects.
If you change:

if(collideType & (TerrainObjectType | InteriorObjectType))

to

if (collideType & (TerrainObjectType | InteriorObjectType | StaticObjectType | StaticRenderedObjectType))

in projectile.cc in the Projectile::explode function (around line 731) would enable you to leave bullet holes on objects.


I am going to test it when I am ready to hack the engine.

#1
12/09/2009 (9:02 pm)
I'm sure somebody can correct me if I'm wrong, but I believe that .dts files are not as easy for a correct decal system, problems being:
Decals will not move with a .dts files animation.
Decals will use the collision hull instead of the visible mesh as a .dif would.

However Ron Nelson recently released his Enhanced Projectile System that would integrate PolySoup .dts collision for visible mesh decals, thats about all I can remember/suggest... hope it helps.
#2
12/10/2009 (12:52 am)
Yep, CSMP's right. However, I think using Static object typemasks will not place decals on objects like Players or Vehicles - but if you have ambient animations on static shapes, then the decals will not follow these.