Projectile
Last updated
Last updated
This component represents automatically moving projectile. This object inflicts damage to Hittable
objects of all opposite teams in certain radius after entering into target collider or after certain amount of time.
Projectile can be auto guided to the target and it can chase it. Projectile class is inherited from IPoolableObject, so it can be got from PoolSystem and it automatically returns to pool after explosion.
Velocity – velocity of projectile movement (units per second). 10 by default.
Guiding – is this projectile guided to the target?
Guiding Force – how strong it is guided to the target? 0 = isn't guided, 1 = maximum guidance
Guiding Angle – width of guidance cone, if target is out of this cone, guiding will be stopped
Guiding Max Dist – max distance to target when guiding works
Lifetime – how much time projectile flies before automatical explosion
Damage Min – min damage to hittables
Damage Max – max damage to hittables
Explosion Radius – radius of explosion (1 unit by default)
Explosion Effect – poolable explosion particle effect.
This method launches projectile from certain owner to the certain target. If owner is not set, this projectile will be neutral (TeamType.None) and will be able to inflict damage both to player team and enemies team.
Example: