Target

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.

Last updated