PDA

View Full Version : Grenade on UDKProjectile



Demestotenes
06-25-2010, 02:00 PM
A falling grenade projectile works on UTProjectile but not on UDKProjectile.
What needs to be done to make UDKProjectile fall?

UTProj_Grenade:

defaultproperties
{
ProjFlightTemplate=ParticleSystem'WP_RocketLaunche r.Effects.P_WP_RocketLauncher_Smoke_Trail'

ProjExplosionTemplate=ParticleSystem'WP_RocketLaun cher.Effects.P_WP_RocketLauncher_RocketExplosion'
ExplosionLightClass=class'UTGame.UTRocketExplosion Light'

speed=700
MaxSpeed=1000.0
Damage=100.0
DamageRadius=200
MomentumTransfer=50000
MyDamageType=class'UTDmgType_Grenade'
LifeSpan=0.0
ExplosionSound=SoundCue'A_Weapon_RocketLauncher.Cu e.A_Weapon_RL_Impact_Cue'
ExplosionDecal=MaterialInstanceTimeVarying'WP_Rock etLauncher.Decals.MITV_WP_RocketLauncher_Impact_De cal01'
DecalWidth=128.0
DecalHeight=128.0
bCollideWorld=true
bBounce=true
TossZ=+245.0
Physics=PHYS_Falling
CheckRadius=36.0

ImpactSound=SoundCue'A_Weapon_RocketLauncher.Cue.A _Weapon_RL_GrenadeFloor_Cue'

bNetTemporary=False
bWaitForEffects=false

CustomGravityScaling=0.5
}CustomGravityScaling is declared in UDKProjectile.
But when i put those defaultproperties to a class extended from UDKProjectile, it will not move, even when i manually set its velocity ( Velocity = dir * Speed )
Probably UDKProjectile does not move with PHYS_Falling (or is it something else?)

Has anyone successfully made a falling projectile on UDKProjectile?
I would be thankful for help.

Demestotenes
06-26-2010, 08:14 AM
When i set the physics to PHYS_Projectile and then set Acceleration, it will fall.
However, the acceleration is not replicated to clients.
Should i add a replication block with 'Acceleration'?

Wizzard~Of~Ozz
06-26-2010, 10:48 AM
The only real difference I can see between your Def. Properties and mine is.

bBlockedByInstigator=false
TerminalVelocity=3500.0

And yes, I have a working Grenade and all my projectiles are based on UDKProjectile.

Demestotenes
06-26-2010, 03:24 PM
The only real difference I can see between your Def. Properties and mine is.

bBlockedByInstigator=false
TerminalVelocity=3500.0

And yes, I have a working Grenade and all my projectiles are based on UDKProjectile.
Thx very much for help.
Now it falls correctly.
Your lines are added in UTProjectile, so UTProj_Grenade inherits them and i didnt see them.