> For the complete documentation index, see [llms.txt](https://rsb.inanevin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rsb.inanevin.com/getting-started/bullet-time-effects/writing-your-own-bullet-time-camera.md).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rsb.inanevin.com/getting-started/bullet-time-effects/writing-your-own-bullet-time-camera.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
