
// This is an example of how to map terrain blend tiles to material
// instances within Torque.  None of these materials will be used
// for rendering, but they will be used by the collision detection
// code and thus play their part in defining interaction behavior
// when coming into contact with these materials.

//-----------------------------------------------------------------------
// Define two material templates...

new Material( TerrainSoft )
{
   FootstepSoundId = 0;       // Soft footstep sound defined on player datablock.
   ImpactSoundId = 0;         // Soft impact sound.
   ShowDust = false;          // Don't show dust particles (footpuffs, hover trails, etc.)
   ShowFootprints = true;     // But show footprints.
};
new Material( TerrainHard )
{
   FootstepSoundId = 1;       // Hard footstep sound defined on player datablock.
   ImpactSoundId = 1;         // Hard impact sound.
   ShowDust = true;           // Show dust particles.
   ShowFootprints = true;     // And show footprints.
};

// If you want custom sound effects for footstep and impact sounds,
// use the 'FootstepSoundCustom' and 'ImpactSoundCustom' material properties
// that allow referencing SFXProfiles and will override the Id-based definitions.

// Note that for the footprint and footstep sound stuff to work, you character models
// must define correct triggers (1==left foot, 2==right foot) on their run animations
// (this is currently not the case with some example models coming with Torque).

//-----------------------------------------------------------------------
// Now define a material for each of the blend textures.

new Material( TerrainDirtGrass : TerrainSoft )
{
   MapTo = "dirt_grass";
};
new Material( TerrainGrass1Dry : TerrainSoft )
{
   MapTo = "grass1-dry";
};
new Material( TerrainGrass1 : TerrainSoft )
{
   MapTo = "grass1";
};
new Material( TerrainGrass2 : TerrainSoft )
{
   MapTo = "grass2";
};
new Material( TerrainRocks : TerrainHard )
{
   MapTo = "rocks1";
   
   // Choose a grey-ish particle color for the dust emitters.
   EffectColor[ 0 ] = "0.5 0.5 0.5 1.0";
   EffectColor[ 1 ] = "1.0 1.0 1.0 0.0";
};
