Class describing all the information of a type of projectile that a GameObject having a UxrProjectileSource component can shoot. Normally there will be a UxrFirearmWeapon with a UxrProjectileSource component supporting one or more UxrShotDescriptor. For example, a rifle with a grenade launcher attachment will be able to fire two types of projectiles: bullets and explosive grenades. UxrProjectileSource components, however, do not require to be part of a UxrFirearmWeapon and can be used on their own.
public class UxrShotDescriptor
The UxrShotDescriptor type exposes the following members.
|The layer mask used to determine which objects can be hit.
|The layer mask used to determine if an impact will generate a decal.
|Duration of the fadeout effect before a PrefabScenarioImpactDecal is destroyed.
|An optional prefab to instantiate at the point of impact.
|Life in seconds after which PrefabInstantiateOnImpact will be destroyed.
|Life in seconds of PrefabInstantiateOnTipWhenShot after which it will be destroyed.
|Whether PrefabInstantiateOnTipWhenShot will be parented to the Tip after being instantiated or will remain unparented.
|An optional prefab that will be instantiated on the Tip each time a round is fired.
|Default decal that will be used when the projectile impacted with something. Can be overriden using the UxrOverrideImpactDecal component.
|Life in seconds after which PrefabScenarioImpactDecal will fadeout and be destroyed.
|The damage a projectile will do if it were to hit at the farthest distance. Damage will linearly decrease over distance from the start down to ProjectileDamageFar until the projectile reaches _projectileMaxDistance.
|The damage a projectile will do if it were to hit at the closest distance. Damage will linearly decrease over distance down to ProjectileDamageFar until the projectile reaches _projectileMaxDistance.
|The force multiplier applied to a rigidbody that was hit by a projectile. The total force applied will be speed * ForceMultiplier.
|The physical length of the projectile, used in ray-casting computations.
|Maximum reach of the projectile, after which it will be destroyed.
|Prefab that will be instantiated as the projectile.
|Speed at which the projectile will move.
|Optional Animator trigger variable name that will be triggered on the weapon each time a round is fired.
|Gets the Transform that is used to fire projectiles from, using the forward vector as direction.
|Gets the Transform that is used to instantiate effects on the tip when a shot was fired, using PrefabInstantiateOnTipWhenShot.
|Gets whether the projectiles fired should be updated automatically to compute their trajectory or they will be updated manually.
|Throws an exception if the object is null. (Defined by ObjectExt.)