Overloads
static Sandbox.SceneTraceResult[] ShootBullets (Scene scene, Ray ray, int count, Vector2 spread, float distance, float radius, float damage, float force, GameObject attacker, GameObject weapon, GameObject ignore, TagSet tags)

Parameters

NameTypeDescription
scene Scene Scene to trace in.
ray Ray Origin and direction the volley is centred on.
count int How many pellets to fire.
spread Vector2 Spread cone in degrees - x wide, y tall.
distance float How far each pellet travels.
radius float Pellet radius - 0 for a thin ray, higher to be forgiving.
damage float Damage dealt by each pellet.
force float Impulse applied by each pellet to the hit physics body.
attacker GameObject Who fired this - credited for the damage and ignored by the traces.
weapon GameObject The weapon GameObject, recorded on the damage.
ignore = null GameObject Hierarchy to ignore. Defaults to .
tags = null TagSet Optional damage tags (e.g. "bullet").

Returns

TypeDescription
Sandbox.SceneTraceResult[]
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.