API Referenceglobal
ShotEffectclass
A resolved shot's presentation data - the muzzle `Sandbox.BaseCombatWeapon.ShotEffect.Origin` (for the tracer, null uses the muzzle transform) and the hit result (for the impact). Handed to `Sandbox.BaseCombatWeapon.OnShootEffects(Sandbox.BaseCombatWeapon.ShotEffect)`.
object→ShotEffect
Constructors1
Showing 1 constructors
public ShotEffect(Vector3 HitPosition, bool Hit, Vector3 Normal, Sandbox.GameObject HitObject, Sandbox.Surface Surface, System.Nullable`1<Vector3> Origin = null, bool NoEvents = False)
| Parameter | Type | Description |
|---|---|---|
| HitPosition | Vector3 | — |
| Hit | bool | — |
| Normal | Vector3 | — |
| HitObject | GameObject | — |
| Surface | Surface | — |
| Origin = null | Nullable<Vector3> | — |
| NoEvents = False | bool | — |
No results match this filter.
Methods1
Showing 1 methods
public void Deconstruct(Vector3 HitPosition, bool Hit, Vector3 Normal, Sandbox.GameObject HitObject, Sandbox.Surface Surface, System.Nullable`1<Vector3> Origin, bool NoEvents)
| Parameter | Type | Description |
|---|---|---|
| HitPosition | Vector3 | — |
| Hit | bool | — |
| Normal | Vector3 | — |
| HitObject | GameObject | — |
| Surface | Surface | — |
| Origin | Nullable<Vector3> | — |
| NoEvents | bool | — |
Returns:
void—No results match this filter.
Properties7
Showing 7 properties
public bool Sandbox.BaseCombatWeapon.ShotEffect.Hit { get; set; }
Returns:
bool—public Sandbox.GameObject Sandbox.BaseCombatWeapon.ShotEffect.HitObject { get; set; }
public Vector3 Sandbox.BaseCombatWeapon.ShotEffect.HitPosition { get; set; }
public bool Sandbox.BaseCombatWeapon.ShotEffect.NoEvents { get; set; }
Returns:
bool—public Vector3 Sandbox.BaseCombatWeapon.ShotEffect.Normal { get; set; }
public System.Nullable`1<Vector3> Sandbox.BaseCombatWeapon.ShotEffect.Origin { get; set; }
public Sandbox.Surface Sandbox.BaseCombatWeapon.ShotEffect.Surface { get; set; }
No results match this filter.