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

Target

PreviousBullet Time EffectsNextBullet

Last updated 3 years ago

Was this helpful?

In order for RSB to trigger a bullet time effect, it needs to hit a target that can be, let's say bullet-time-able. This is determined by the BulletTimeTarget.cs script, which can be found under InanEvin>Realistic Sniper and Ballistics>src>BulletTime folder. Let's attach this script to our cube object

Note that we have removed the BallisticSurface.cs script from the cube for the sake of the tutorial, however it doesn't affect the bullet time at all. So an object can be penetrable, or ricochet-able, and still can be a bullet time target. RSB is only concerned with wheter the BulletTimeTarget.cs script is attached or not.

Now let's move the cube to 0,0,100 position, so it's far away from the camera. This way, the default minimum distance of 90 will not prevent the effect from being triggered. Also, let's scale our cube to 5,6,1 and make sure it's rotation is 0,0,0. If you fire at this point, there won't be any changes in the scene when the target is hit.

Right now, the bullet time effects are not being triggered, because when we are firing using FireBallisticsBullet method, we do not pass in any arguments for bullet time. Before doing so, we would need to setup a bullet mesh in the scene which will be visible during bullet time effects.

BulletTimeTarget.cs attached to our cube object.
Hitting the cube at 0,0,100 which has BulletTimeTarget.cs on it. No effect is triggered at this stage.