Author Topic: Projectile becoming invisble in a strange fashion.  (Read 1022 times)

 I have a model that I'm using for a thrown grenade that will become invisible under certain conditions. The model is visible just prior to release, but will disappear at least one second after release. After that, the projectile will be invisible so long as, from your point of view, the projectile is in front of either bricks or terrain. However, the projectile will become visible if you see it in front of the skybox.

 I don't know if it has anything to do with it, but I'm making the grenade bounce around before it detonates.

I have tried letting Blender automatically set a hierarchy, it proved futile.

Code: [Select]
AddDamageType("smokegrenadeDirect",   '<bitmap:base/client/ui/ci/generic> %1',    '%2 <bitmap:base/client/ui/ci/generic> %1',1,1);
AddDamageType("smokegrenadeRadius",   '<bitmap:base/client/ui/ci/generic> %1',    '%2 <bitmap:base/client/ui/ci/generic> %1',1,0);
datablock ProjectileData(smokegrenadeProjectile)
{
   projectileShapeName = "./smokegrenadeThrown.dts";
   directDamage        = 0;
   directDamageType = $DamageType::smokegrenadeDirect;
   radiusDamageType = $DamageType::smokegrenadeRadius;
   impactImpulse    = 1000;
   verticalImpulse    = 1000;
   explosion           = smokegrenadeExplosion;
   particleEmitter     = ImpactGrenadeTrailEmitter;

   brickExplosionRadius = 0;
   brickExplosionImpact = false;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 0; //30             
   brickExplosionMaxVolume = 0;  //30         //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloating = 0;  //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume)

   muzzleVelocity      = 38; //50
   velInheritFactor    = 1.0;
   explodeOnPlayerImpact = false;
   explodeOnDeath        = true;

   armingDelay         = 2990;
   lifetime            = 3000;
   fadeDelay           = 0;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = true;
   gravityMod          = 1.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "1 0 0.0";

   uiName = "Smoke Grenade";
};

It's being rendered as an invisible color. You have to make the model not render at all.


Try something like this too.
Code: [Select]
   lifetime            = 100;
   fadeDelay           = 5000;

Oh, I notice the fade delay...

Well, I already managed to resolve the problem, but thanks anyways.
« Last Edit: February 28, 2012, 07:49:34 PM by FrogFreak »

I have been having this issue with another projectile, but only under certain conditions: It must be an event spawned projectile AND it must be on adjustable slate... :S

I dunno...

I think adjustable plate does somthing to projectiles.
I have seen this problem only on this map also.

Oh, I notice the fade delay...

Well, I already managed to resolve the problem, but thanks anyways.

Would you mind elaborating on how you fixed the issue?
I've experienced almost the exact same problem with all of my custom project models, and I've yet to figure out how to fix this.. :S

Ok, so, I think part of the problem MIGHT just be adjustable slate. However, If I'm correct, to fix the rest of the issue with other maps is to let Blender apply the appropriate empties required, it will ask if Blender is to automatically set up the hierarchy or something along those lines. Let it do just that, that should be all you need to do.