Firing with bullet time
Request cinematic playback through the legacy or per-shot firing API.
Extend TutorialShooter with two serialized references:
[SerializeField] private Transform bulletTimeStart;
[SerializeField] private Transform bulletTimeBullet;Replace the body of its Fire() method with:
SniperAndBallisticsSystem.instance.FireBallisticsBullet(
bulletProperties, bulletTimeStart, bulletTimeBullet);Assign bulletTimeStart to the Main Camera for this tutorial, or to a muzzle transform when adding a weapon. Assign bulletTimeBullet to the inactive scene instance of Bullet Time - Bullet.
The first optional argument controls the visual bullet's starting point. The second is the visible bullet itself. The system's Fire Transform still controls the actual simulation ray origin and direction.
The cosmetic start is optional; if omitted, the system uses the captured firing position. For ordinary legacy shots, omit the visual bullet argument. A target and bullet object are not sufficient on their own: add the camera listener in the next section.
Per-shot API
When using independent shooters, explicitly opt the shot into the cinematic check. In your weapon's firing method:
var shot = new BulletShotParameters(muzzle.position, muzzle.forward)
{
Shooter = gameObject,
ZeroDistance = 0f,
AllowBulletTime = true,
BulletTimeBullet = bulletTimeBullet,
BulletTimeOrigin = muzzle
};
long shotId = SniperAndBallisticsSystem.instance.FireBallisticsBullet(
bulletProperties, shot);Add a serialized Transform bulletTimeBullet reference to that weapon and assign the visual bullet. The cosmetic origin's position is captured at firing; leave BulletTimeOrigin null to use the shot's simulation origin. This overload does not use the system's Fire Transform.
AllowBulletTime defaults to false. When enabled, the system setting, chance, active target, minimum distance and listener still determine eligibility. If prediction finds no eligible target, normal simulation starts with the same shot ID, owner and firing settings. Every recorded path point and replayed impact retains the bullet properties and shot metadata.
Bullet time is global: it changes Time.timeScale and blocks new shots through both APIs until it finishes. The per-shot overload returns 0 for that rejection. Disable UseBulletTime for uninterrupted simultaneous combat. The start event may fire before FireBallisticsBullet returns; use IDs on the path records inside that callback.