Realistic Sniper and Ballistics
  • Welcome
  • Introduction
    • Feature List
    • Why/How is it used?
    • Quick Setup
  • Getting Started
    • Getting Started
    • Environment Properties
    • Bullet Properties
    • Object Poolers
    • Sniper and Ballistics System
    • Firing a Bullet
    • Listening to Hit Events
      • Spawning Particles on Hit
      • Hit Tags
    • Zero Distances
    • Wind Vector
    • Air Resistance
    • Spin Drift
    • Ballistic Surfaces - Penetration
    • Ballistic Surfaces - Ricochet
    • Bullet Time Effects
      • Target
      • Bullet
      • Firing with Bullet Time
      • Bullet Time Camera - Default
      • Writing your Own Bullet Time Camera
    • Dynamic Scope System
    • Incorporating Player
      • Player Movement Controller
      • Motion Controller
      • Camera Controller
      • Player With Weapon
    • Mobile Controls
    • Conclusion
  • API
    • API Welcome
    • Sniper and Ballistics System
    • Dynamic Scope System
    • Player Movement Controller
    • Motion Controller
    • Ballistic Surface
    • Environment Properties
    • Ballistics Utility
    • Bullet Time Utility
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Bullet Time Effects

Writing your Own Bullet Time Camera

The Bullet Time Camera Default is an intuitive and powerful tool to create bullet time effects that will fit to most gameplay scenarios. However, if you want to write your own camera effect, code the logic yourself, RSB provides the means to do so. There are 4 events in SniperAndBallisticsSystem.cs that will be fired during a bullet time:

  • EBulletTimeStarted: Fired when a BulletTimeTarget.cs object is hit, bullet object is enabled, ready to be travelled through it's path.

  • EBulletTimeUpdated: Fired when the bullet travels through it's path.

  • EBulletTimePathFinished: Fired when bullet hit's the target.

  • EBulletTimeEnded: Fired when the timescales are set back to normal and everything is resetted.

By creating a script that listens to this events, you can enable a camera when the bullet time is triggered, move the camera during the update events, and disable the camera when it ends. You can fill in the logic in anyway you want in between. There exists a template class to do this, navigate to InanEvin>Realistic Sniper and Ballistics>src>BulletTime folder and take a look at BulletTimeCameraEmpty.cs file. This provides the baseline support for writing a simple bullet time camera. It's a good starting point, so if you want to try writing your own logic, you should start by copying this template.

PreviousBullet Time Camera - DefaultNextDynamic Scope System

Last updated 3 years ago

Was this helpful?