Vanishing projectiles
by Benj · in Torque Game Engine · 03/29/2007 (7:40 pm) · 12 replies
Im having a weird problem, which i noticed when i started making my own weapon projectile/script, my projectile fires just fine and everything, but vanishes shortly after its fired, its still there, as it hits, but totally invisible except for the light it casts on the ground/objects.
any ideas?
any ideas?
#2
03/29/2007 (8:28 pm)
Hmmm, it isn't affecting it, i even cranked it upto 50'000 and it still vanishes at the same point.
#3
03/29/2007 (9:02 pm)
Check your LOD yet?
#4
03/30/2007 (7:28 am)
Nope, not that, i just now gave it 128 detail levels, still vanishes at the same spot. this is so frusterating.
#5
--Amr
03/30/2007 (8:39 am)
Have you had a look at the lifetime property in the datablock? See if you can set it to a high value.--Amr
#6
03/30/2007 (9:03 am)
Its at 5000 just like the fadedelay. iam also having problems with the look animation lining up with the actual look angle, if anyone knows the range of angles that animation is supposed to be :P
#7
--Amr
03/30/2007 (9:09 am)
Any chance you could post your weapon and projectile scripts? It might help to have a look at them,.--Amr
#8
but here it is anyway:
the 50000 fadedelay was part of me trying to make it not vanish.
the weapon script is just the normal crossbow script with a different model.
03/30/2007 (9:54 am)
They are just the normal crossbow/bolt scripts, since this is my first time trying to make a weapon, all ive changed is the model, which is just a small sphere and the weapon model, which has no actual model since im making a robot that fires out its arms.but here it is anyway:
datablock ProjectileData(CrossbowProjectile)
{
projectileShapeName = "~/data/shapes/units/smallshot.dts";
directDamage = 20;
radiusDamage = 20;
damageRadius = 1.5;
areaImpulse = 2000;
explosion = CrossbowExplosion;
waterExplosion = CrossbowWaterExplosion;
//particleEmitter = CrossbowBoltEmitter;
//particleWaterEmitter= CrossbowBoltBubbleEmitter;
splash = CrossbowSplash;
muzzleVelocity = 50;
velInheritFactor = 0.3;
armingDelay = 0;
lifetime = 5000;
fadeDelay = 50000;
bounceElasticity = 0;
bounceFriction = 0;
isBallistic = false;
gravityMod = 0.80;
hasLight = true;
lightRadius = 4;
lightColor = "0.5 0.5 0.25";
hasWaterLight = true;
waterLightColor = "0 0.5 0.5";
};the 50000 fadedelay was part of me trying to make it not vanish.
the weapon script is just the normal crossbow script with a different model.
#9
--Amr
03/30/2007 (10:00 am)
Hmm...have you tried using your CrossbowProjectile with an existing weapon that works (e.g.: the ork's crossbow)? As Tim did, I'd point the finger of blame on your model LODs - could you paste a screenshot of a list of all the objects in your model?--Amr
#10
03/30/2007 (10:22 am)
Ya i have been using it with the crossbow, only this morning did i change its model. gimme a minute, ill edit the post with a picture of the projectile model in blender
#11
--Amr
03/30/2007 (10:53 am)
Right - it seems like you only have 1 detail marker at 128. This means that the model Sphere.001 will be drawn when its size on the screen is 128 pixels or more. I think this explains why your particle has been disappearing. If you want your projectile to appear all the time, change the detail marker to Detail0. Then, your model will be drawn when it is 0 pixels in size or more - in otherwords all the time. Give that a go and see if it works.--Amr
#12
edit: ah cool, it works now, thanks
03/30/2007 (11:04 am)
It was at 8, and had the same effect as 128. ill try 0 thoedit: ah cool, it works now, thanks
Torque 3D Owner Tom Feni
fadeDelay = 5000;
raise or lower depending on how long you want the projectile to last.. best to have this related to the lifetime setting..
TomFeni