BulletShotParameters
Per-shot firing settings, defaults and snapshot behavior.
Source: src/System/BulletShotParameters.cs. This is a runtime struct in IE.RSB.
public BulletShotParameters(Vector3 origin, Vector3 direction)Pass the struct to long FireBallisticsBullet(BulletProperties properties, BulletShotParameters parameters). See Multiple shooters for a complete weapon component.
| Field | Type | Meaning / default |
|---|---|---|
Origin | Vector3 | World-space firing position. |
Direction | Vector3 | World-space aim direction; normalized on firing. Must be finite and nonzero. |
Shooter | GameObject | Optional owner reported on every point; null by default. |
AllowSelfHits | bool | False by default: ignore the supplied shooter's collider hierarchy. |
ZeroDistance | float? | Meters; null captures CurrentZeroDistance. Zero disables compensation. A nonzero distance must already be prepared on the bullet. |
RayMask | LayerMask? | Null captures the system's mask. Zero explicitly hits nothing. |
AllowBulletTime | bool | False by default. Opt in to the system's cinematic eligibility check. |
BulletTimeBullet | Transform | Optional visual bullet; required to start bullet time. |
BulletTimeOrigin | Transform | Optional cosmetic starting point. Its position is captured on firing; null uses Origin. |
The constructor sets Origin and Direction and leaves the other fields at the defaults above. default(BulletShotParameters) has a zero direction and must be configured before firing.
The system copies values into an internal shot context, including the zeroing angle, resolved mask, owner reference, self-hit policy and cosmetic origin. Reusing or modifying the request does not modify an accepted shot. The owner and bullet assets remain object references; scene environment and effect settings remain shared.
The overload returns a positive shot ID or 0 if rejected. Rejections include unactivated/null bullet properties, invalid direction/origin, invalid or unprepared zero distance, and an active global bullet-time sequence. Prepare ranges via the system's zero-distance list and ActivateBullet before firing.
Owner filtering follows the collider's current hierarchy under Shooter, without layer changes. Set Shooter to the character root. Detached colliders are not filtered, and team filtering is your game's responsibility. Physics trigger queries use the global Physics.queriesHitTriggers setting.
Bullet time remains global: AllowBulletTime only controls whether this shot can request it. It does not let a shot bypass an already-running cinematic. See SniperAndBallisticsSystem for the firing overloads and BulletPoint for hit identity.